SnowPro Core Exam QuestionsBrowse all questions from this exam

SnowPro Core Exam - Question 175


Which columns are part of the result set of the Snowflake LATERAL FLATTEN command? (Choose two.)

Show Answer
Correct Answer: BCD

When executing the Snowflake LATERAL FLATTEN command, the resulting columns typically include PATH and INDEX. PATH represents the path to the element within the data structure being flattened, while INDEX represents the position of the element within the array, if it is one. These columns are essential for understanding the structure and position of the unflattened elements.

Discussion

11 comments
Sign in to comment
KarBiswaOptions: BD
Feb 10, 2023

The output of Flatten: SEQ A unique sequence number associated with the input record; the sequence is not guaranteed to be gap-free or ordered in any particular way. KEY For maps or objects, this column contains the key to the exploded value. PATH The path to the element within a data structure which needs to be flattened. INDEX The index of the element, if it is an array; otherwise NULL. VALUE The value of the element of the flattened array/object. THIS The element being flattened (useful in recursive flattening).

tejarunOptions: BD
Nov 25, 2022

https://docs.snowflake.com/en/sql-reference/functions/flatten.html

AlexbDkuOptions: BD
Dec 20, 2022

https://docs.snowflake.com/en/sql-reference/functions/flatten.html

SV1122
Jan 1, 2023

Was on exam Dec 31st 2022

halolOptions: BD
Dec 7, 2022

https://docs.snowflake.com/en/sql-reference/functions/flatten.html

Sharan009
Feb 4, 2023

The result value of flatten command is SEQ, PATH, KEY, INDEX, VALUE, THIS

VEEDOLOptions: BD
Jun 1, 2023

answer - BD In Snowflake, the LATERAL FLATTEN command is used to unnest semi-structured data stored in variant or object columns. When you execute the LATERAL FLATTEN command, it generates a new virtual table with the unnested data. The result set of the LATERAL FLATTEN command includes the following columns: KEY: This column contains the key or path to the unnested element within the original semi-structured data. INDEX: This column represents the index of the unnested element within the array or object. ELEMENT: This column contains the value of the unnested element. These three columns make up the result set of the LATERAL FLATTEN command and provide the necessary information to access and process the unnested data.

SoftwareEngineerGoneDataOptions: BD
Aug 16, 2023

https://docs.snowflake.com/en/sql-reference/functions/flatten#output

akhandelwal680Options: AB
May 15, 2023

A. CONTENT and B. PATH. The LATERAL FLATTEN command expands a VARIANT, OBJECT, or ARRAY column into multiple rows, where CONTENT represents the expanded values and PATH represents the path to the expanded values within the original column. The columns C. BYTE_SIZE, D. INDEX, and E. DATATYPE are not part of the result set of the LATERAL FLATTEN command.

_yyuktaOptions: BD
Feb 25, 2024

B and D are correct

Mallikharjuna452
Jul 20, 2024

PATH,INDEX