
Answer-first summary for fast verification
Answer: src:salesPerson.name, SRC:salesPerson.name
The question asks for two methods to access a JSON object in Snowflake from a VARIANT column. According to Snowflake documentation and the community discussion (with 100% consensus for BD and upvoted comments), the column name in dot notation is case-insensitive, but element names (JSON keys) are case-sensitive. Options B (src:salesPerson.name) and D (SRC:salesPerson.name) are equivalent because 'SRC' (column alias) is case-insensitive, while 'salesPerson.name' (JSON path) matches the case shown in the reference image. Option A (src:salesperson.name) is incorrect due to the lowercase 'p' in 'salesperson', which does not match the case-sensitive JSON key. Options C and E are incorrect because 'Name' (uppercase 'N') does not match the actual key 'name' (lowercase 'n'). The community discussion confirms that only B and D are valid, as they correctly handle case sensitivity for JSON elements while respecting case insensitivity for column names.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Given the following table, which two methods can a Snowflake user employ to access a JSON object?
CREATE TABLE products (
id INTEGER,
name VARCHAR,
details VARIANT
);
CREATE TABLE products (
id INTEGER,
name VARCHAR,
details VARIANT
);

A
src:salesperson.name
B
src:salesPerson.name
C
src:salesPerson.Name
D
SRC:salesPerson.name
E
SRC:salesPerson.Name