DEA-C02 · Question #94
A Data Engineer has a table with no clustering key defined. The Engineer wants to analyze the distribution of micro-partitions by using system functions. To identify the best clustering key for the…
The correct answer is A. An error saying Invalid clustering key or table table1 is not clustered. SYSTEM$CLUSTERING_INFORMATION requires a clustering key to already be defined on the table - without one, Snowflake has no reference point for analyzing micro-partition distribution, so it returns an error indicating the table is not clustered (option A). Option B is wrong…
Question
A Data Engineer has a table with no clustering key defined. The Engineer wants to analyze the distribution of micro-partitions by using system functions. To identify the best clustering key for the table, the Engineer executes the following query:
SELECT SYSTEM$CLUSTERING_INFORMATION('table1'); What will be the result of this query?
Options
- AAn error saying Invalid clustering key or table table1 is not clustered
- BNotes with suggestions on how to make the clustering more efficient
- CAn error saying The table name must be enclosed by double quotation marks
- DA histogram depicting the distribution of overlap depth for each micro-partition in the table
How the community answered
(29 responses)- A97% (28)
- D3% (1)
Explanation
SYSTEM$CLUSTERING_INFORMATION requires a clustering key to already be defined on the table - without one, Snowflake has no reference point for analyzing micro-partition distribution, so it returns an error indicating the table is not clustered (option A). Option B is wrong because Snowflake doesn't offer proactive clustering suggestions through this function - that kind of advisory output doesn't exist in this context. Option C is wrong because the syntax shown (single-quoted string argument) is perfectly valid; double quotes are used for object identifiers in SQL, not for string arguments to system functions. Option D describes output that this function would return - specifically, JSON containing overlap depth and clustering depth metrics - but only when a valid clustering key is already in place; without one, execution fails before any output is produced.
Memory tip: Think of SYSTEM$CLUSTERING_INFORMATION as a report card for an existing clustering key - if no key exists, there's nothing to grade, and Snowflake throws an error rather than guessing what to analyze.
Topics
Community Discussion
No community discussion yet for this question.