Change a Sigma table primary key (Beta)
This documentation describes one or more public beta features that are in development. Beta features are subject to quick, iterative changes; therefore the current user experience in the Sigma service can differ from the information provided in this page.
This page should not be considered official published documentation until Sigma removes this notice and the beta flag on the corresponding feature(s) in the Sigma service. For the full beta feature disclaimer, see Beta features.
When you create a local Sigma table, Sigma automatically generates a new Id text column and uses it as the default primary key. This column contains system-generated key values that uniquely identify each row in the table so Sigma can find rows to update or delete when you edit data.
To identify rows using your own data, you can change the primary key to a single text column or multiple text columns that form a composite key.
This page explains how to change the primary key of a local Sigma table. For information about local Sigma tables and how to create them, see Create local Sigma tables. For general information about Sigma tables, see Sigma tables overview.
Sigma tables are currently supported by Snowflake, Databricks, and PostgreSQL connections.
Requirements
To change the primary key of a Sigma table:
- The table must be a local Sigma table. You cannot change the primary key of an organization-wide table.
- You must be the owner of the Sigma table (Can own access).
Change the primary key
Choose a column with values that are unique, not null, and stable over time, such as store ID. Avoid dates, timestamps, row numbers, and calculated values that can repeat or change.
When no single column uniquely identifies each row, select multiple columns to create a composite key. For example, store ID might repeat across regions, but the region and store code together identify exactly one store.
-
Open the workbook draft that contains the local Sigma table.
-
Select the local Sigma table element, then open the Properties panel to view the data source. A Local table badge displays next to the source name.
-
Click the down arrow (
) next to the data source name, then select Change primary key column(s) in the menu.
-
In the modal, click the Select the new primary key column(s) field.
-
In the dropdown, select the checkbox next to each column you want to use as the primary key. Clear the checkbox next to any column you want to remove from the key.
The dropdown shows all columns in the Sigma table, but you can select only text columns. Other column types cannot be used as the primary key.
-
Sigma checks for duplicate and null values in the primary key:
- If Sigma detects duplicate or null values, select different columns or resolve the issue before attempting to change the primary key.
- If Sigma detects no duplicate or null values, the primary key is valid. Click Save.
Sigma changes the primary key in your data platform and locks the local Sigma table to prevent edits while the change is in progress. If Sigma completes the primary key change but you still cannot edit the table, refresh the page and continue editing the data.

