Login
Free Sign Up
Docs
/

Canvas Tabular Preview and Extraction

Tabular operations read the content of a Canvas node and produce previews, extracted tables, and Schema literals.

Preview

A preview is returned as one of four kinds, identified by the kind field. If the node's pinned content hash does not match the stored content, the preview fails with Artifact pin is stale.

kind

Shown when

Fields

workbook

The node holds a raw workbook file

filename, size, sheets[] { name, range, rowCount, columnCount }

table

Media type application/vnd.ligantic.table+json

name, sheetName, range, headers, rows, rowCount, columnCount

schema-definition

Media type application/vnd.ligantic.schema-definition+json

name, fields[] { key, name }

unknown

Any other media type

mediaType

A table preview returns at most 50 rows. rowCount reports the full row count.

Extract Table

Reads the workbook on the source node, extracts the named sheet, and saves a new Canvas version.

Input

Required

Description

Source node

Yes

The workbook node to extract from

sheetName

Yes

Name of the sheet to extract

range

No

A1-style range such as A1:D200. Leave blank to take the whole sheet

Errors:

Condition

Message

Source node is not in the Canvas

Source node not found

Source node is not backed by workbook content

Source node is not backed by a workbook

Canvas changed in another session

Conflict. Reload the Canvas and reapply the change

On success the snapshot gains two nodes and two edges:

Node

Type

Contents

step-<id>

step:extract-table

data: { kind, sheetName, range? }, no backing references

table-<id>

artifact

The stored table artifact, plus the source node's flow-run reference if present

Edges: source node → step, step → table.

The table artifact is stored with media type application/vnd.ligantic.table+json. Its name is <sheetName> (<range>).

The three affected nodes are auto-laid-out around the source node. The version summary is Extracted table from <sheetName>.

Derive Schema Literal

Reads the table on the source node and saves a version with a schema:literal node wired to it.

Parameter

Required

Description

name

Optional

Schema name. Defaults to <sheetName> Extract

columns

Optional

{ header, name?, include? }[]. Defaults to every header with include: true

Errors:

Condition

Message

Source node is not in the Canvas

Source node not found

Source node is not backed by a table

Source node is not backed by a table

Every column is excluded

At least one column must be included

Field keys are derived from the column name or header: lowercased, non-alphanumeric runs collapsed to _, leading and trailing _ trimmed, a leading digit prefixed with column_, and duplicates suffixed with _2, _3, and so on. An empty result falls back to column_<index+1>.

Every derived field has type string. The Schema's display name template is {<first field key>}.

The definition artifact uses media type application/vnd.ligantic.schema-definition+json. The new node is schema:literal with label set to the Schema name and an edge labelled derive from the table node. The version summary is Derived schema <schemaName>.

Acceptance

Table extraction and Schema derivation accept their output automatically in the same save. No human review step is involved. See Canvas Review and Provenance.