nerdexam
Snowflake

COF-C02 · Question #111

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

The correct answer is B. PATH D. INDEX. The LATERAL FLATTEN function in Snowflake explodes arrays or objects into rows and returns a fixed set of output columns: SEQ, KEY, PATH, INDEX, VALUE, and THIS. PATH (B) represents the path to the element within the source data structure. INDEX (D) represents the position of…

Data Transformations

Question

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

Options

  • ACONTENT
  • BPATH
  • CBYTE_SIZE
  • DINDEX
  • EDATATYPE

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    88% (21)
  • E
    8% (2)

Explanation

The LATERAL FLATTEN function in Snowflake explodes arrays or objects into rows and returns a fixed set of output columns: SEQ, KEY, PATH, INDEX, VALUE, and THIS. PATH (B) represents the path to the element within the source data structure. INDEX (D) represents the position of the element in an array (NULL for objects). CONTENT, BYTE_SIZE, and DATATYPE are not columns returned by FLATTEN.

Topics

#FLATTEN function#Semi-structured data#JSON processing#ARRAY processing

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice