Table Constraints
Table constraints define the rules and relationships that apply to columns in a table — such as primary keys, foreign keys, and unique constraints. In Collate, these constraints are automatically captured during metadata ingestion and displayed on the table’s detail page, giving you a clear picture of how your tables relate to one another. Understanding table constraints helps with:- Data discovery: Quickly see which columns are keys or references to other tables.
- Lineage tracking: Foreign key relationships feed into Collate’s lineage graph.
- Data governance: Enforce and communicate structural rules about your data.
Viewing Table Constraints
Once metadata ingestion is complete:- Open the table you want to inspect.
- Click the Columns tab (selected by default).
-
Scroll down the right panel to find the Table Constraints section.

Editing Table Constraints
You can manually add or modify table constraints directly from the Collate UI if they were not captured during ingestion or need correction.Before You Begin
Make sure you have Edit permissions on the table. If the edit option is grayed out, contact your Collate administrator to request the appropriate role.Steps to Edit
- Navigate to the table’s detail page and open the Columns tab.
-
Click the Edit (pencil) icon next to the Table Constraints section in the right panel.

-
An editing panel appears where you can add, update, or remove constraints. For each constraint, select the Constraint Type and the Column(s) it applies to. Collate supports the following constraint types:
- Primary Key — Identifies each row in the table uniquely. Select one or more columns that form the primary key.
- Foreign Key — Links a column in this table to a column in another table. After selecting the columns, specify the referenced table and column, and choose the relationship type (One to One, One to Many, Many to One, Many to Many).
- Unique — Ensures all values in the selected column(s) are distinct.
- Dist Key — Marks the column used to distribute rows across nodes (common in Redshift and Snowflake).
- Sort Key — Marks the column used to sort rows on disk for faster queries (common in Redshift and Snowflake).
- Cluster Key — Marks the column used for clustering (common in BigQuery and Snowflake).

- Save your changes.