Complete the code to enable data lineage tracking for a Snowflake table.
ALTER TABLE sales_data SET [1] = TRUE;Setting CHANGE_TRACKING to TRUE activates data lineage tracking on the table.
Complete the code to query the lineage information for a specific table in Snowflake.
SELECT * FROM [1] WHERE DEPENDED_ON_OBJECT_NAME = 'sales_data';
The ACCOUNT_USAGE.OBJECT_DEPENDENCIES view shows lineage and dependencies between objects.
Fix the error in the code to enable lineage tracking on a table named 'orders'.
ALTER TABLE orders SET [1] = TRUE;The property CHANGE_TRACKING must be set to the boolean value TRUE without quotes.
Fill both blanks to create a query that shows the source and dependent objects for 'customer_data'.
SELECT [1], [2] FROM ACCOUNT_USAGE.OBJECT_DEPENDENCIES WHERE DEPENDED_ON_OBJECT_NAME = 'customer_data';
The DEPENDED_ON_OBJECT_NAME is the source object, and DEPENDING_OBJECT_NAME is the dependent object.
Fill all three blanks to create a query that lists all tables with lineage tracking enabled in a specific schema.
SELECT TABLE_NAME AS [1], TABLE_SCHEMA AS [2] FROM INFORMATION_SCHEMA.TABLES WHERE [3] = 'YES' AND TABLE_SCHEMA = 'SALES';
Use table_name, table_schema as aliases, and filter by CHANGE_TRACKING = 'YES'.