Staging Data Files from a Local File System

Execute PUT using the SnowSQL client or Drivers to upload (stage) local data files into an internal stage.

Staging the Data Files

User Stage

The following example uploads a file named data.csv in the /data directory on your local machine to your user stage and prefixes the file with a folder named staged.

Note that the @~ character combination identifies a user stage.

  • Linux or macOS

    PUT file:///data/data.csv @~/staged;
    
    Copy
  • Windows

    PUT file://C:\data\data.csv @~/staged;
    
    Copy
Table Stage

The following example uploads a file named data.csv in the /data directory on your local machine to the stage for a table named mytable.

Note that the @% character combination identifies a table stage.

  • Linux or macOS

    PUT file:///data/data.csv @%mytable;
    
    Copy
  • Windows

    PUT file://C:\data\data.csv @%mytable;
    
    Copy
Named Stage

The following example uploads a file named data.csv in the /data directory on your local machine to a named internal stage called my_stage. See Choosing an Internal Stage for Local Files for information on named stages.

Note that the @ character by itself identifies a named stage.

  • Linux or macOS

    PUT file:///data/data.csv @my_stage;
    
    Copy
  • Windows

    PUT file://C:\data\data.csv @my_stage;
    
    Copy

Listing Staged Data Files

To see files that have been uploaded to a Snowflake stage, use the LIST command:

User stage:

LIST @~;
Copy

Table stage:

LIST @%mytable;
Copy

Named stage:

LIST @my_stage;
Copy

Next: Copying Data from an Internal Stage