Loading Data into Snowflake Using COPY INTO Command
📖 Scenario: You are working as a data engineer. You have a CSV file stored in a Snowflake stage. Your task is to load this data into a Snowflake table using the COPY INTO command.
🎯 Goal: Build a Snowflake script that creates a table, sets up a stage, and uses the COPY INTO command to load data from a CSV file into the table.
📋 What You'll Learn
Create a table named
employees with columns id (integer), name (string), and salary (number).Create a named stage called
my_csv_stage pointing to an internal location.Use the
COPY INTO command to load data from a CSV file named employees.csv in the stage into the employees table.Specify the file format as CSV with header row skipped.
💡 Why This Matters
🌍 Real World
Loading data from files into Snowflake tables is a common task in data engineering pipelines to prepare data for analysis.
💼 Career
Understanding how to use the COPY INTO command and manage stages and file formats is essential for roles like data engineer, cloud data architect, and database administrator working with Snowflake.
Progress0 / 4 steps