0
0
Snowflakecloud~10 mins

Data lineage tracking in Snowflake - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable data lineage tracking for a Snowflake table.

Snowflake
ALTER TABLE sales_data SET [1] = TRUE;
Drag options to blanks, or click blank then click option'
ALINEAGE_ENABLED
BDATA_RETENTION_TIME_IN_DAYS
CCHANGE_TRACKING
DTIME_TRAVEL
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing lineage tracking with time travel or change tracking features.
2fill in blank
medium

Complete the code to query the lineage information for a specific table in Snowflake.

Snowflake
SELECT * FROM [1] WHERE DEPENDED_ON_OBJECT_NAME = 'sales_data';
Drag options to blanks, or click blank then click option'
AACCOUNT_USAGE.OBJECT_DEPENDENCIES
BACCOUNT_USAGE.QUERY_HISTORY
CINFORMATION_SCHEMA.COLUMNS
DINFORMATION_SCHEMA.TABLES
Attempts:
3 left
💡 Hint
Common Mistakes
Using TABLES or COLUMNS views which do not show lineage.
Using QUERY_HISTORY which shows query logs, not lineage.
3fill in blank
hard

Fix the error in the code to enable lineage tracking on a table named 'orders'.

Snowflake
ALTER TABLE orders SET [1] = TRUE;
Drag options to blanks, or click blank then click option'
ACHANGE_TRACKING
BDATA_RETENTION_TIME_IN_DAYS
CLINEAGE_ENABLED
DTIME_TRAVEL
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around TRUE which causes syntax errors.
Using wrong property names.
4fill in blank
hard

Fill both blanks to create a query that shows the source and dependent objects for 'customer_data'.

Snowflake
SELECT [1], [2] FROM ACCOUNT_USAGE.OBJECT_DEPENDENCIES WHERE DEPENDED_ON_OBJECT_NAME = 'customer_data';
Drag options to blanks, or click blank then click option'
ADEPENDED_ON_OBJECT_NAME
BOBJECT_NAME
CDEPENDING_OBJECT_NAME
DOBJECT_SCHEMA
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up DEPENDED_ON_OBJECT_NAME and DEPENDING_OBJECT_NAME.
Selecting schema names instead of object names.
5fill in blank
hard

Fill all three blanks to create a query that lists all tables with lineage tracking enabled in a specific schema.

Snowflake
SELECT TABLE_NAME AS [1], TABLE_SCHEMA AS [2] FROM INFORMATION_SCHEMA.TABLES WHERE [3] = 'YES' AND TABLE_SCHEMA = 'SALES';
Drag options to blanks, or click blank then click option'
Alineage_status
Btable_name
Ctable_schema
DCHANGE_TRACKING
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect alias names.
Using a non-existent column for filtering lineage.