SnowPro Core Certification — Question 1082
How does Snowflake recommend defining a clustering key on a high-cardinality column that includes a 15 digit ID numbered column, ID_NUMBER?
Answer options
- A. TRUNC(ID_NUMBER, -6)
- B. TRUNC(ID_NUMBER, 5)
- C. ID_NUMBER*100
- D. TO_CHAR(ID_NUMBER)
Correct answer: A
Explanation
The correct answer, A, recommends using TRUNC(ID_NUMBER, -6) to efficiently define a clustering key on high-cardinality data by focusing on the leading digits. Option B, TRUNC(ID_NUMBER, 5), truncates too many digits and may not maintain sufficient uniqueness. Option C, ID_NUMBER*100, alters the original numeric value, which is not suitable for clustering. Option D, TO_CHAR(ID_NUMBER), converts the number to a string format, which is also not ideal for clustering purposes.