Skip to main content

Table Metadata

The Table Metadata section of a task lets you describe the Delta table the task produces — its primary key, comments, tags, constraints, and per-column documentation. Use it to keep schema documentation alongside the pipeline that produces the data, so Unity Catalog stays up to date without a separate process.

You can define:

  • Table Comment
  • One or multiple Table Tags
  • Table Primary Key
  • One or multiple Foreign Keys
  • One or multiple Unique Constraints
  • Liquid Clustering Columns
  • Column Comments
  • One or multiple Column Tags

As in Databricks itself, primary and foreign keys are informational and aren't enforced at runtime.

When it appears​

Table Metadata appears on ingestion tasks that elevate data to a Delta table, where Schema Name and Table Name are configurable options.

Open a valid task, switch the form to Advanced mode, and scroll to the Table Metadata section.

Table Metadata section in the task configuration

The section is organised as a stack of panels:

  1. Sync from Databricks — pull live metadata from the corresponding Delta table
  2. Table Comment — free-text description of the table
  3. Table Tags — key/value tags applied to the table itself
  4. Primary Key — the columns that uniquely identify a row
  5. Foreign Keys — references to columns in other tables
  6. Unique Constraints — column sets that must be unique across rows
  7. Liquid Clustering Columns — columns Databricks should cluster the table on
  8. Column Tags/Comments — per-column documentation in a grid

You can fill any subset — every section is optional.

Sync from Databricks​

If the target table already exists in the lakehouse, Sync from Databricks synchronises the table metadata directly from the corresponding Delta table.

Sync is one-way: it reads metadata from the Delta table into Insight Factory. It never writes to the Delta table — metadata is only pushed to Databricks when it is processed during a task run (see Applying table metadata to the Delta table).

  1. Make sure Schema Name and Table Name are set on the task. The Sync button is disabled until both are filled.
  2. Click Sync from Databricks at the top of the section.
  3. The button shows Syncing… while it fetches. On success a green tick appears next to it and a success toast. On failure a red cross and an error toast.
warning

Synchronisation overwrites your local values in Insight Factory: any metadata you have defined in Table Metadata that does not exist on the Delta table is removed from the form. If this was not what you intended, you can still cancel the operation — close the Table Properties panel without saving.

Comments are the one exception. The table comment and per-column comments keep your local value where the Delta table has no comment; where the Delta table has a comment, it overwrites yours. Columns that do not exist on the Delta table are removed entirely, including their comments.

If you change Schema Name or Table Name between syncs, the next sync treats the form as a different table and starts from a clean slate — comments are not preserved either.

Table-level fields​

Table Comment​

A free-text description of what the table holds.

Table Comment field

Table Tags​

Key/value pairs attached to the table. Use them for governance metadata (environment: prod, owner: data-eng, pii: true).

To add a tag:

  1. Enter a Key and Value in the input fields below the saved tags list.
  2. Click Add Tag.

The new tag appears in the list above as Key:Value. Click the close icon on a tag to remove it.

Keys must be unique across the table's tags — adding a second tag with the same key shows a validation error.

You cannot remove existing tags from the Delta table using table metadata — you can only add new tags or edit the values of existing tags.

Table Tags section

Primary Key​

A comma-separated list of column names that uniquely identify a row. For composite keys, list each column separated by commas — for example, org_id, user_id.

The columns named here are highlighted with a yellow key icon in the Column Tags/Comments grid.

Primary Key field

Foreign Keys​

Each foreign key declares that one or more columns in this table reference columns in another table. Typically, a foreign key comprises just a single column; for a composite foreign key, comma-delimit the columns as a single string.

To add a foreign key:

  1. Fill in Column(s) — the column or comma-separated columns in this table.
  2. Fill in Referenced table in schema.table format.
  3. Optionally fill in Referenced column(s) — if the referenced columns have different names from yours.
  4. Click Add Foreign Key.

The saved foreign key renders as column → schema.table (refcolumn) so you can see at a glance what points where.

The columns referenced by the foreign key must be declared in the primary key or a unique constraint of the referenced table. The order, number, and data types of the referenced columns must match the order, number, and data types of the columns declared in the foreign key.

Foreign Keys section

Columns appearing in a foreign key are highlighted with a blue link icon in the Column Tags/Comments grid.

Unique Constraints​

Each unique constraint is a set of columns whose combined values must be unique across the table.

  1. Enter a comma-separated list of column names in Columns.
  2. Click Add Unique Constraint.

For a single-column constraint, just enter the one column name. For a composite constraint, list every column in the set.

Unique Constraints section

Liquid Clustering Columns​

A comma-separated list of column names Databricks should use for liquid clustering. You can declare up to four columns, and any column in a Liquid Cluster must be in the first 32 columns of the Delta table.

If the Delta table has a business key declared in Task metadata (standard practice for dimension and merge-into tables), the columns of this business key form the first version of the Liquid Clustering columns for the table. You can change the Liquid Cluster column definition after table creation.

To let Databricks choose the clustering columns for you, enter auto instead of column names. When the metadata is processed, this applies CLUSTER BY AUTO to the table, and Databricks selects and maintains the clustering columns based on the query workload. If the table already uses automatic clustering, it is left unchanged.

Liquid Clustering Columns field

Column Tags/Comments​

The Column Tags/Comments grid lets you document every column in the table.

ColumnDescription
ColumnThe column name. Editable until a row is saved, then locked. Highlighted with a key icon if it's part of the primary key, or a link icon if it's part of a foreign key.
TypeThe column's data type, populated from Databricks via Sync. Not editable here — change the type in Databricks.
CommentA free-text description of the column. Multi-line.
TagsKey/value tags attached to the column. The first few show as chips; the rest are accessible via the edit icon.

Column Tags/Comments grid

Adding and removing columns​

  • Click the + icon in the grid toolbar to add a blank row.
  • Click the delete icon on a row to remove the column. Removing a column also cleans up references to it — see Deleting a column.
  • Use the search box in the toolbar to filter the grid by column name.

Editing column tags​

Click the edit icon next to the tag chips on a column to open the Edit tags modal.

Edit tags modal

In the modal:

  1. Existing tags appear at the top — edit Key/Value inline, or click the delete icon to remove a tag.
  2. Add a new tag by entering a Key and Value in the draft area and clicking Add Tag.
  3. Click Save to commit the changes, or Cancel to discard.

Keys must be unique within the column's tags. Both Key and Value are required to add a tag.

As with table tags, you cannot remove existing tags from the Delta table using table metadata — you can only add new tags or edit the values of existing tags.

Generate missing table and column comments with AI​

Table and column comments can be generated automatically by AI. Tick the Generate missing table and column comments with AI checkbox below the grid. When the metadata is processed, AI generates a comment for the table and for each column that has no comment on the target table and no value in the table metadata.

Comments are only generated where they do not yet exist. Existing comments — on either the table or a column — are never overwritten by AI-generated ones. If the checkbox is not ticked, no comments are generated.

Deleting a column​

When you delete a column from the grid, all dangling references to it from elsewhere in the metadata will be stripped including:

  • Primary Key — the column name is removed from the comma-separated list.
  • Foreign Keys — any foreign key whose Column becomes empty after removal is dropped entirely.
  • Unique Constraints — any constraint whose Columns set becomes empty is dropped.
  • Liquid Clustering Columns — the column name is removed from the list.

Applying table metadata to the Delta table​

To keep task runs performant, table metadata is not checked or applied against the corresponding Delta table in the lakehouse during a task run unless one of the following is true:

  1. The table does not yet exist in the lakehouse and will be created by the run of this task.
  2. You run the task manually with Run with Options and tick Process Table Metadata.

This is particularly important when deploying existing tasks with new or altered table metadata: use option 2 to apply the new or altered table metadata to the Delta table in the target environment.