ExamGecko
Question list
Search
Search

Question 622 - SnowPro Core discussion

Report
Export

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?

A.

select data:BIKEID

Answers
A.

select data:BIKEID

B.

select data.BIKE.BIKEID

Answers
B.

select data.BIKE.BIKEID

C.

select data:BIKE.BIKEID

Answers
C.

select data:BIKE.BIKEID

D.

select data:BIKE:BIKEID

Answers
D.

select data:BIKE:BIKEID

Suggested answer: C

Explanation:

In Snowflake, when accessing elements within a JSON object stored in a variant column, the correct syntax involves using a colon (:) to navigate the JSON structure. The BIKEID attribute, which is a child of the BIKE root node in the JSON object, is accessed using data:BIKE.BIKEID. This syntax correctly references the path through the JSON object, utilizing the colon for JSON field access and dot notation to traverse the hierarchy within the variant structure.

Reference: Snowflake documentation on accessing semi-structured data, which outlines how to use the colon and dot notations for navigating JSON structures stored in variant columns.

asked 29/10/2024
Cesar Augusto Veliz Reyes
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first