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 250 MB.

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.

To refresh the directory table on a stage, select the refresh icon.

Managing staged files¶

You can use Snowsight to take the following actions on staged files:

For files on an internal stage, you can also take the following actions:

  • Select More options » Download to download the file from the stage.

  • Select More options » Remove to remove the file from the stage.

Note

To download a file from an external stage, see Downloading staged files in Snowsight.

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.

Troubleshooting¶

Files are not visible on an external stage¶

This issue can occur when an external stage does not have a directory table enabled, or when information about the external storage location is incorrect.

To fix this issue, try the following:

  • Make sure the stage owner has enabled a directory table on the stage.

  • Double check that the directory table has been refreshed. To refresh the directory table, select your stage in Snowsight, then select the refresh icon.

  • Verify that the cloud provider URL is correct. If your URL contains a subpath, ensure that there is a trailing slash.

Upload files button is unavailable (inactive)¶

This issue can occur when you do not have the required privileges to upload files to an internal stage, or if another upload is in progress.

To fix this issue, try the following:

  • Make sure that you have selected an internal stage.

  • Use a role that is granted or inherits the USAGE privilege on the database and schema and the WRITE privilege on the stage.

  • Check whether another upload is in progress. Hovering over the inactive button displays information about any in-progress uploads. Snowsight also displays a notification for in-progress uploads. If another upload is in progress, it must complete before you can upload additional files onto the stage.