ExamGecko
Question list
Search
Search

Question 179 - SnowPro Core discussion

Report
Export

The following JSON is stored in a VARIANT column called src of the CAR_SALES table:

A user needs to extract the dealership information from the JSON.

How can this be accomplished?

A.
select src:dealership from car_sales;
Answers
A.
select src:dealership from car_sales;
B.
select src.dealership from car_sales;
Answers
B.
select src.dealership from car_sales;
C.
select src:Dealership from car_sales;
Answers
C.
select src:Dealership from car_sales;
D.
select dealership from car_sales;
Answers
D.
select dealership from car_sales;
Suggested answer: B

Explanation:

In Snowflake, to extract a specific element from a JSON stored in a VARIANT column, the correct syntax is to use the dot notation. Therefore, the queryselect src.dealership from car_sales;will return the dealership information contained within each JSON object in thesrccolumn.

asked 23/09/2024
Kameron Katoku
47 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first