
Answer-first summary for fast verification
Answer: It removes the outer array structure and loads the records into separate table rows.
The STRIP_OUTER_ARRAY file format option in Snowflake is specifically designed for loading JSON data that is wrapped in an outer array structure. When enabled, it removes the outer array brackets and loads each element of that array as a separate row in the table. This is particularly useful when loading JSON files containing multiple records within a single array structure, as it allows each record to become an individual table row rather than treating the entire array as one row. Option B correctly describes this behavior. Option A is incorrect because it doesn't remove just the 'last element' but the entire outer array structure. Option C is wrong as it mentions removing trailing spaces, which is not what STRIP_OUTER_ARRAY does. Option D is incorrect because it mentions removing NULL elements, which is not the function of this option - STRIP_OUTER_ARRAY deals with array structure, not data validation or NULL handling.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A user is loading JSON documents that consist of a large outer array containing multiple records into Snowflake. The user enables the STRIP_OUTER_ARRAY file format option.
What is the function of the STRIP_OUTER_ARRAY file format option?
A
It removes the last element of the outer array.
B
It removes the outer array structure and loads the records into separate table rows.
C
It removes the trailing spaces in the last element of the outer array and loads the records into separate table columns.
D
It removes the NULL elements from the JSON object eliminating invalid data and enables the ability to load the records.
No comments yet.