nerdexam
Snowflake

COF-C02 · Question #413

Regardless of which notation is used, what are considerations for writing the column name and element names when traversing semi-structured data?

The correct answer is D. The column name is case-insensitive but element names are case-sensitive. When querying semi-structured data (e.g., VARIANT columns) in Snowflake, the column name itself follows standard SQL case-insensitivity rules - 'my_col' and 'MY_COL' resolve to the same column. However, element names within the semi-structured payload (JSON keys, object field…

Data Transformations

Question

Regardless of which notation is used, what are considerations for writing the column name and element names when traversing semi-structured data?

Options

  • AThe column name and element names are both case-sensitive.
  • BThe column name and element names are both case-insensitive.
  • CThe column name is case-sensitive but element names are case-insensitive.
  • DThe column name is case-insensitive but element names are case-sensitive.

How the community answered

(52 responses)
  • A
    4% (2)
  • C
    2% (1)
  • D
    94% (49)

Explanation

When querying semi-structured data (e.g., VARIANT columns) in Snowflake, the column name itself follows standard SQL case-insensitivity rules - 'my_col' and 'MY_COL' resolve to the same column. However, element names within the semi-structured payload (JSON keys, object field names) are case-sensitive because Snowflake preserves the original casing of the source data. For example, 'src:firstName' and 'src:firstname' would return different (or null) results if the JSON key is 'firstName'.

Topics

#Semi-structured Data#Case Sensitivity#Variant Data#Data Traversal

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice