View input table audit history (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.
Input table audit history records versioned snapshots of input table row and schema changes over time. For each input table, Sigma automatically creates a warehouse-native view in your data platform that can help you understand the following:
- Row-level history: What changed in a specific row, who made the change, and when the change occurred.
- Schema history: When a column was created, renamed, or changed to a different data type, along with who made the change and when the change occurred.
This document explains how to view the audit history for a specific input table.
Requirements
There are two ways to access the audit history for a specific input table: Query the view using custom SQL, or create a table element that references the audit history view. The requirements for each method are as follows:
-
The ability to query the view using custom SQL requires the following:
- You must be assigned an account type with the Create, edit, and publish workbooks and Write SQL permissions enabled.
- You must have Can use access to the connection the input table writes to.
- You must be the workbook owner or be granted Can explore or Can edit workbook access.
-
To surface the audit history as a table element, you must be assigned the Admin account type.
Query audit history using custom SQL
Query the audit history for a specific input table using custom SQL.
The following steps enable you to query the audit history in an existing workbook. You can also create a new workbook from a SQL query and skip to step 4. See Create a workbook from SQL.
-
Open a workbook draft or custom view. The workbook doesn't need to contain the relevant input table.
-
In the Add element bar, select Data > Table.
-
In the Select source popover, select SQL as the data source, then choose the same connection the input table uses.
You can confirm the connection the input table uses in the workbook lineage. In the input table's element toolbar, click
More, then select View lineage and reference the Connection field in the element's summary card.
-
Sigma adds a new SQL element to the workbook. In the query editor, enter the following SQL statement, replacing
<DATABASE>,<SCHEMA>, and<INPUT_TABLE_ID>with the relevant values for your input table.SELECT * FROM <DATABASE>.<SCHEMA>."INPUT_TABLE_AUDIT_LOG_<INPUT_TABLE_ID>"You can obtain the database, schema, and input table ID values from the query history in the workbook containing the input table (see View individual query details for guidance on access). In the query history, select any query that references the input table, then find the database table name (structured as
<DATABASE>.<SCHEMA>.<INPUT_TABLE_ID>) in the SQL. When parsing the input table ID for the SQL statement, exclude theSIGDS_prefix.An input table is unique to the workbook version containing it and the connection it uses. Each of the following workflows replaces the original input table with a copy of it, resulting in a new input table ID that must be updated in the custom SQL to continue viewing the relevant audit history.
- Duplicating the workbook
- Creating a tagged version of the workbook
- Restoring a workbook version
- Swapping the input table connection
-
Click Run, then view the audit history in the SQL result or Table tab.
Create a table element containing audit history
If you're an organization admin, you can create a table element that surfaces the audit history view for a specific input table. When the table element is published, the table is available to any user with access to the workbook and the ability to view the page containing the table.
-
Open the draft of the workbook containing the relevant input table.
-
In the input table's element toolbar, click
More, then select Advanced options > Create audit history table.
Sigma adds a new table element containing the input table's audit history.
-
In the workbook header, click Publish to make the table available to all users who can view the workbook page containing the table.
Updated about 2 hours ago
