nerdexam
Snowflake

SOL-C01 · Question #125

A data engineer is tasked with loading JSON data containing nested arrays into Snowflake. Some JSON files exceed Snowflake's maximum single row size limit. Which of the following strategies is the MOS

The correct answer is B. Pre-process the JSON files to split large arrays into multiple smaller JSON documents before. Pre-processing large JSON files into smaller documents (B) directly addresses Snowflake's hard 16 MB maximum row size limit for VARIANT columns - splitting arrays into multiple valid JSON documents ensures each row fits within that constraint while keeping the data intact and que

Data Loading and Unloading

Question

A data engineer is tasked with loading JSON data containing nested arrays into Snowflake. Some JSON files exceed Snowflake's maximum single row size limit. Which of the following strategies is the MOST effective way to handle this situation while maintaining data integrity and query performance?

Options

  • AIncrease the MAX FILE SIZE parameter in the Snowflake stage configuration to accommodate
  • BPre-process the JSON files to split large arrays into multiple smaller JSON documents before
  • CUse the `STRIP OIJTER ARRAY file format option during the COPY INTO command to flatten the
  • DLoad the entire JSON file as a single VARIANT column and then use Snowflake's JSON parsing
  • EImplement a custom IJDF (User-Defined Function) in JavaScript to recursively parse the JSON

How the community answered

(45 responses)
  • A
    27% (12)
  • B
    51% (23)
  • C
    7% (3)
  • D
    13% (6)
  • E
    2% (1)

Explanation

Pre-processing large JSON files into smaller documents (B) directly addresses Snowflake's hard 16 MB maximum row size limit for VARIANT columns - splitting arrays into multiple valid JSON documents ensures each row fits within that constraint while keeping the data intact and queryable with standard lateral flattening.

Why the distractors fail:

  • A - MAX_FILE_SIZE controls stage file upload chunks, not the per-row size limit; that limit is architectural and cannot be raised via configuration.
  • C - STRIP_OUTER_ARRAY is a real and useful option that loads outer array elements as individual rows, but it only addresses one level of nesting and won't help if the resulting individual elements still exceed 16 MB.
  • D - Loading the entire oversized file as a single VARIANT is exactly what fails; Snowflake will reject it at ingestion because the row exceeds the size ceiling.
  • E - JavaScript UDFs execute after data is already loaded into a table, so they cannot solve a problem that prevents loading in the first place.

Memory tip: Think "slice before you stage" - just like you can't fit a whole roast into a jar, you must cut the data down before it enters Snowflake. Any in-Snowflake solution (UDF, VARIANT, options in COPY INTO) assumes the data already made it through the door.

Topics

#Nested JSON arrays#COPY INTO#Row size limits#Data preprocessing

Community Discussion

No community discussion yet for this question.

Full SOL-C01 Practice