DEA-C02 · Question #49
A CSV file, around 1 TB in size, is generated daily on an on-premise server. A corresponding table, internal stage, and file format have already been created in Snowflake to facilitate the data…
The correct answer is B. On the on-premise server, schedule a SQL file to run using SnowSQL that executes a PUT to. Option B is correct because it uses SnowSQL on the on-premise server (where the file actually lives) to execute a PUT command - which uploads the CSV to Snowflake's internal stage - followed by a COPY INTO statement to load it into the table; this leverages the already-created…
Question
A CSV file, around 1 TB in size, is generated daily on an on-premise server. A corresponding table, internal stage, and file format have already been created in Snowflake to facilitate the data loading process. How can the process of bringing the CSV file into Snowflake be automated using the LEAST amount of operational overhead?
Options
- ACreate a task in Snowflake that executes once a day and runs a COPY INTO statement that
- BOn the on-premise server, schedule a SQL file to run using SnowSQL that executes a PUT to
- COn the on-premise server, schedule a SQL file to run using SnowSQL that executes a PUT to
- DOn the on-premise server, schedule a Python file that uses the Snowpark Python library. The
How the community answered
(66 responses)- A14% (9)
- B74% (49)
- C3% (2)
- D9% (6)
Explanation
Option B is correct because it uses SnowSQL on the on-premise server (where the file actually lives) to execute a PUT command - which uploads the CSV to Snowflake's internal stage - followed by a COPY INTO statement to load it into the table; this leverages the already-created stage and file format with minimal setup.
Option A fails because a Snowflake task runs SQL inside Snowflake and cannot initiate a PUT command to pull a file from an external on-premise server - Snowflake has no network reach back to your local machine.
Option C is a common distractor that typically omits the PUT step or reverses the order; without first staging the file, COPY INTO from an internal stage has nothing to load.
Option D using the Snowpark Python library is technically viable but introduces unnecessary operational overhead - additional Python dependencies, library management, and more complex scheduling - compared to a simple SnowSQL script.
Memory tip: Think "PUT then COPY, SnowSQL is the key" - the file must be PUT to the stage before you can COPY it into the table, and SnowSQL is the lightweight CLI bridge that lets you run both commands from your on-premise server with a simple scheduled script.
Topics
Community Discussion
No community discussion yet for this question.