Staging Files Using Snowsight

With Snowsight, you can create and manage named stages without writing SQL. You can also upload files onto a named internal stage so that you can view your files, reference the files in a Python worksheet, or load data from the files into a table.

You cannot upload files onto user stages or table stages using Snowsight. Refer to Overview of Data Loading for more about stages.

Creating a Stage

You can use Snowsight to create a named internal or external stage.

Note

You must use a role that is granted or inherits the USAGE privilege on the database and schema that store the stage and the CREATE STAGE privilege on the schema.

Refer to Access Control Requirements for CREATE STAGE.

Create a Named Internal Stage

To use Snowsight to create a named internal stage, do the following:

  1. Sign in to Snowsight.

  2. Select Data » Databases.

  3. Select the database and schema where you want to create a stage.

  4. Select Create » Stage » Snowflake Managed.

  5. Enter a Stage Name.

  6. Optionally deselect Directory table. Directory tables let you see files on the stage, but require a warehouse and thus incur a cost. You can choose to deselect this option for now and enable a directory table later.

  7. Select the type of Encryption supported for all files on your stage. For details, see encryption for internal stages. You cannot change the encryption type after you create the stage.

    Note

    To enable data access, we recommend that you select server-side encryption. Otherwise, staged files are client-side encrypted by default and unreadable when downloaded. For more information, see Server-side Encryption for Unstructured Data Access.

  8. Complete the fields to describe your stage. For more information, refer to CREATE STAGE.

  9. Select Create.

Create a Named External Stage

To use Snowsight to create a named external stage, do the following:

  1. Sign in to Snowsight.

  2. In the navigation menu, select Data » Databases.

  3. Select the database and schema where you want to create a stage.

  4. Select Create » Stage.

  5. Select the supported cloud storage service where your files are located.

  6. Enter a Stage Name.

  7. Enter the URL of your external cloud storage location.

  8. If your external storage is not public, enable Authentication and enter your details. For more information, refer to CREATE STAGE.

  9. Optionally deselect Directory table. Directory tables let you see files on the stage, but require a warehouse and thus incur a cost. You can choose to deselect this option for now and enable a directory table later.

    If you enable Directory table, optionally select Enable auto-refresh and select your event notification or notification integration to automatically refresh the directory table when files are added or removed. To learn more, see Automated Directory Table Metadata Refreshes.

  10. If your files are encrypted, enable Encryption and enter your details.

  11. Optionally expand the SQL Preview to view a generated SQL statement. To specify additional options for your stage such as AUTO_REFRESH, you can open this SQL preview in a worksheet.

  12. Select Create.

Uploading Files onto a Stage

You can use Snowsight to upload files onto a named internal stage.

To upload files onto external stages in services such as Amazon S3, Microsoft Azure, or Google Cloud Storage, use the tools for those cloud services.

Upload Files onto a Named Internal Stage

Note

The maximum file size is 50MB.

You must use a role that is granted or inherits the USAGE privilege on the database and schema and the WRITE privilege on the stage to perform these steps. Refer to Stage Privileges.

To upload files onto your stage, do the following:

  1. Sign in to Snowsight.

  2. Select Data » Databases.

  3. Select the database schema in which you created the stage, and select the stage.

  4. Select + Files to upload files onto the stage.

  5. In the Upload Your Files dialog that appears, select the files that you want to upload. You can upload multiple files at once.

  6. Optionally, select or create a path where you want to save your files within the stage.

  7. Select Upload.

After you upload files onto the stage, you can take one of the following actions depending on the file:

Viewing Staged Files

You can view staged files using Snowsight. You can view files from both internal and external stages.

Note

You must use a role that is granted or inherits the USAGE privilege on the database and schema and the READ privilege on the stage to perform these steps.

  1. Sign in to Snowsight.

  2. Select Data » Databases.

  3. Select the database and schema that contain the stage.

  4. Select Stages and select the stage for which you want to view files.

  5. If prompted, select Enable Directory Table to enable a directory table for the stage so that you can see files.

  6. If prompted, select a warehouse to refresh the directory table.

Managing Stages

To manage a stage in Snowsight, do the following:

Note

You must use a role that is granted or inherits the USAGE privilege on the database and schema and the OWNERSHIP privilege on the stage to perform these steps.

  1. Sign in to Snowsight.

  2. Select Data » Databases.

  3. Select the database and schema that contain the stage.

  4. Select Stages and select the stage.

  5. Select Stage Details.

You can manage the stage in the following ways:

  • Select More options » Edit to edit properties or enable a directory table for the stage object.

  • Select More options » Clone to clone the stage.

  • Select More options » Drop to drop, or remove, the stage.

  • Select More options » Transfer Ownership to transfer OWNERSHIP privileges of the stage to another role.

If you want to manage privileges for the stage, use the Privileges section to view, grant, and revoke privileges.