Step 2. Create stage objects

A stage specifies where data files are stored (i.e. “staged”) so that the data in the files can be loaded into a table. A named internal stage is a cloud storage location managed by Snowflake.

Creating a named stage is useful if you want multiple users or processes to upload files. If you plan to stage data files to load only by you, or to load only into a single table, then you may prefer to use your user stage or the table stage. For information, see Bulk loading from a local file system.

In this step, you create named stages for the different types of sample data files.

Creating a stage for CSV data files

Execute CREATE STAGE to create the my_csv_stage stage:

CREATE OR REPLACE STAGE my_csv_stage
  FILE_FORMAT = mycsvformat;
Copy

Note that if you specify the FILE_FORMAT option when creating the stage, it is not necessary to specify the same FILE_FORMAT option in the COPY command used to load data from the stage.

Creating a stage for JSON data files

Execute CREATE STAGE to create the my_json_stage stage:

CREATE OR REPLACE STAGE my_json_stage
  FILE_FORMAT = myjsonformat;
Copy

Next: Step 3. Stage the data files