SnowPro Core Certification — Question 553
A JSON object is loaded into a column named data using a Snowflake variant datatype. The root node of the object is BIKE. The child attribute for this root node is BIKEID.
Which statement will allow the user to access BIKEID?
Answer options
- A. select data:BIKEID
- B. select data.BIKE.BIKEID
- C. select data:BIKE.BIKEID
- D. select data:BIKE:BIKEID
Correct answer: C
Explanation
The correct answer is C because it uses the appropriate syntax to access a child attribute within a JSON object in a variant column. Option A fails to reference the root node, while option B incorrectly uses dot notation, which is not suitable for accessing nested attributes in this context. Option D uses a mix of colon and dot notation incorrectly, which also does not follow the proper syntax.