COF-C02 practice question 27 of 35

Which system_defined, read-only view display information on column lineage that specifies how data flows from source to target in a SQL write operation?

Full set: 778 questions
Answer options
A: ACCESS_HISTORY Correct answer
B: LOAD_HOSTORY
C: QUERY_HISTORY
D: COPY_HISTORY
Correct Answer:
A. ACCESS_HISTORY
Explanation

The ACCESSHISTORY view, located in the ACCOUNTUSAGE schema, is specifically designed to track data lineage. It logs read and write operations on Snowflake objects. For write operations such as INSERT, MERGE, or CREATE TABLE ... AS SELECT, this view captures which source columns were read to populate target columns. This information is detailed in the objectsmodified column, which contains arrays specifying the source objects and columns that contributed to the modification, thereby providing explicit column-level lineage. This directly answers the question of how data flows from source to target.

Why Incorrect

B. LOADHISTORY: This view tracks metadata for data loaded into tables using the COPY INTO command, not lineage from general SQL write operations.
C. QUERYHISTORY: This view provides a history of executed SQL statements and performance data but does not offer structured, queryable column-level lineage information.
D. COPYHISTORY: This view tracks the history of data loaded from files into tables, similar to LOADHISTORY, and is not used for tracking SQL-based column lineage.

References

1. Snowflake Documentation: ACCESSHISTORY View. This document states, "For a write operation, the objectsmodified column identifies the object that was written to... The column lineage feature... tracks how data flows from the source columns to the target columns in a writing operation."

2. Snowflake Documentation: Introduction to Access History and Data Governance. Under the "Column Lineage" section, it explicitly mentions, "Snowflake tracks the flow of data from column to column through the ACCESSHISTORY View in the ACCOUNTUSAGE Schema."

3. Snowflake Documentation: LOADHISTORY View. This document describes the view as containing "the history of data loaded into tables using the COPY INTO

command." This confirms it is for bulk loading, not general SQL lineage.

4. Snowflake Documentation: QUERYHISTORY View. This page details the columns available, which include query text, execution status, and performance metrics, but no structured lineage data.

Scroll to Top