# Step 2. Create a Named Stage Object¶

Execute CREATE STAGE to create a named external stage. An external stage references data files stored in a S3 bucket. In this case, we are creating a stage that references the sample data files necessary to complete the tutorial.

This step is recommended when you plan to load data files regularly from the same source.

The following examples create external stages that specify the file formats you created in Step 1. Note that if you specify file format options (or a named file format object) for the stage, it isn’t necessary to later specify the same file format options in the COPY command used to load data from the stage.

## Stage for CSV Data Files¶

The following example creates an external stage named my_csv_stage. Parameter values that aren’t specified use the default values (DATE_FORMAT = AUTO, COMPRESSION = AUTO, etc.).

CREATE OR REPLACE STAGE my_csv_stage
FILE_FORMAT = mycsvformat
URL = 's3://snowflake-docs';


## Stage for JSON Data Files¶

The following example creates an external stage named my_json_stage. Parameter values that aren’t specified use the default values (DATE_FORMAT = AUTO, COMPRESSION = AUTO, etc.).

CREATE OR REPLACE STAGE my_json_stage
FILE_FORMAT = myjsonformat
URL = 's3://snowflake-docs';


Note

In regular use, if you were creating a stage that pointed to your private data files, you would reference a storage integration created using CREATE STORAGE INTEGRATION by an account administrator (i.e. a user with the ACCOUNTADMIN role) or a role with the global CREATE INTEGRATION privilege:

CREATE OR REPLACE STAGE external_stage
FILE_FORMAT = mycsvformat
URL = 's3://private-bucket'
STORAGE_INTEGRATION = myint;