nerdexam
Snowflake

COF-C02 · Question #599

What is the benefit of using the STRIP_OUTER_ARRAY parameter with the COPY INTO <table> command when loading data from a JSON file into a table?

The correct answer is B. It removes the outer array structure and loads separate rows of data. When a JSON file contains a top-level array (e.g., [{...}, {...}, {...}]), Snowflake would by default load the entire file as a single VARIANT row. Setting STRIP_OUTER_ARRAY = TRUE removes the enclosing brackets and treats each element of the array as a separate row, which is…

Data Loading and Unloading

Question

What is the benefit of using the STRIP_OUTER_ARRAY parameter with the COPY INTO <table> command when loading data from a JSON file into a table?

Options

  • AIt flattens multiple arrays into a single array.
  • BIt removes the outer array structure and loads separate rows of data
  • CIt transforms a pivoted table into an array.
  • DIt tokenizes each data string using the defined delimiters.

How the community answered

(48 responses)
  • A
    6% (3)
  • B
    88% (42)
  • C
    2% (1)
  • D
    4% (2)

Explanation

When a JSON file contains a top-level array (e.g., [{...}, {...}, {...}]), Snowflake would by default load the entire file as a single VARIANT row. Setting STRIP_OUTER_ARRAY = TRUE removes the enclosing brackets and treats each element of the array as a separate row, which is almost always the desired behavior for JSON arrays. It does not flatten nested arrays (A), reverse a pivot (C), or tokenize strings by delimiters (D).

Topics

#Snowflake#COPY INTO#JSON loading#STRIP_OUTER_ARRAY

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice