A CSV file of approximately 1 TB is produced each day on an on-premises server. A corresponding table, internal stage, and file format have already been created in Snowflake to support the data-loading process.
How can loading the CSV file into Snowflake be automated with the least operational overhead ?
A Create a task in Snowflake that executes once a day and runs a COPY INTO statement that references the internal stage. The internal stage will read the files directly from the on-premise server and copy the newest file into the table from the on-premise server to the Snowflake table. B On the on-premise server, schedule a SQL file to run using SnowSQL that executes a PUT to push a specific file to the internal stage. Create a task that executes once a day in Snowflake and runs a COPY INTO statement that references the internal stage. Schedule the task to start after the file lands in the internal stage. C On the on-premise server, schedule a SQL file to run using SnowSQL that executes a PUT to push a specific file to the internal stage. Create a pipe that runs a COPY INTO statement that references the internal stage. Snowpipe auto-ingest will automatically load the file from the internal stage when the new file lands in the internal stage. D On the on-premise server, schedule a Python file that uses the Snowpark Python library. The Python script will read the CSV data into a DataFrame and generate an INSERT INTO statement that will directly load into the table. The script will bypass the need to move a file into an internal stage. Show Answer Answer Explanation Files on an on-premises server must first be uploaded to a Snowflake internal stage using PUT, which SnowSQL can execute on a schedule. A Snowflake task can then execute COPY INTO from that stage to the target table. An internal stage does not directly access an on-premises filesystem, and the standard Snowpipe auto-ingest workflow is for externally staged cloud-storage files rather than this local-file workflow.
Learn more
Community Discussion