Export a workbook to cloud storage (Beta)
This feature is currently in beta. Beta features are subject to quick, iterative changes. As a result, this document may not reflect the most current version.
The data for elements in workbooks can be exported to Amazon Simple Storage Service (AWS S3) or Google Cloud Storage (GCS). Cloud storage is particularly useful for large multi-GB data exports.
Contents
Requirements
Supported file types and export limits
Configure cloud storage
Format a destination URI
Example URI
Send a single export
Create a scheduled export
Related resources
Requirements
- You must be an organization Admin or be assigned a custom account type with the appropriate permissions. For more information see User account types.
- You must have a Snowflake connection.
- In Snowflake, your user's role will need at least CREATE INTEGRATION privilege to create a storage integration. Otherwise the ACCOUNTADMIN role can be used. For more information see the Snowflake documentation.
- Sigma will ask for the storage integration’s name.
Supported file types and export limits
Supported file types: CSV (.csv)
GZIP compressions: supported (.csv.gz)
Export file size limit: 5 GB
Note: the data is directly unloaded from Snowflake to your cloud storage bucket as a single file. Because of this, the data won't have the same formatting you see within the Sigma app.
Configure cloud storage
Before you can export to cloud storage within Sigma, set up your Snowflake storage integration. Please follow Snowflake’s instructions to create your storage integration for either AWS S3 or GCS.
AWS S3
- See: Configuring Secure Access to Amazon S3. This will be done from inside AWS and will require an AWS root user to do.
- The STORAGE_AWS_ROLE_ARN generated from that procedure is required to include when creating the storage integration in Snowflake.
-
Creating the storage integration will require
CREATE INTEGRATION
privileges for the Snowflake role the user is using in there, or an ACCOUNTADMIN role can do it. - After the storage integration has been created, you will need to grant
USAGE
permission to it on the Snowflake role that your Sigma Snowflake Connection is configured to use. A Sigma admin is able to check what role this is by going into the Connection's settings. (If no role is specified in your Sigma Snowflake Connection, then Snowflake fallsback to using a default role that is set in there.)
Format a destination URI
A URI represents your export’s target file path in your cloud storage provider.
Use the following template to format your URI:
<schema>://<bucket>/<filepath>/<filename><filetype><compression>
Schema: “s3” if exporting to S3 or “gcs” if exporting to GCS
Bucket: the highest level storage object supported by cloud storage provider; can be thought of as a root folder
File Path (optional): target subdirectories in the bucket. If this value is excluded, your files will be added directly to the root of your bucket.
File Type: “.csv”
Compression (optional): can only be “.gz”
Example URI
s3://my-sigma-bucket/cloud-exports/sales.csv.gz
If your URI is identical to an existing file in the bucket, the file will be overwritten.
Send an export to cloud storage as needed
- From the workbook header menu (▼), select Send now.
The Send Now modal opens, with email as the default destination.
This option is only available from a workbook's latest published or tagged version. If the menu item is disabled the workbook is in Edit mode. Either publish your draft or return to the latest published or tagged version of the workbook before attempting to send an email. -
Change Destination to Cloud Storage.
The modal changes to show fields specific to the cloud storage integration. - Enter the name of your Snowflake storage integration in the Storage Integration field.
- Enter your destination URI in the Destination Cloud Storage URI field, as previously mentioned at Format a destination URI.
-
Select the workbook element to export from the Element menu.
-
Select a Format, either CSV or CSV, gzipped.
-
Click Send.
Sigma sends an export confirmation to your email.
Schedule a cloud storage export
- From the workbook header menu (▼), select Schedule exports.
Sigma opens the Schedule Exports modal. -
a. If this is the workbook's first schedule, click Add Schedule.
b. If one or more schedules already exist, click + New Schedule.
The New schedule dialog opens.
-
For Destination, select Cloud Export.
The modal changes to show fields specific to the cloud storage integration. - Enter a Schedule Name.
- Enter a Send condition.
- For Storage Integration, enter the name of your Snowflake Storage Integration. See Configure cloud storage.
-
Enter your destination URI in the Destination Cloud Storage URI field, as previously mentioned at Format a destination URI.
-
Select the workbook element to export from the Element menu.
-
Select a Format, either CSV or CSV, gzipped.
-
(Optional) Select Prefix filename with the current date. If this option is not selected, the URI targeted file will be rewritten to the newest version on each scheduled export.
- Set the delivery schedule.
- For Repeat by select a schedule option: Day/Week, Month or Custom.
- From the Timezone, select a time zone.
- Setting a schedule's frequency depends on the Repeat by selection.
- Day/Week: pick the schedule's day or days of the week (On days), how often on a day (Occurrence) and time of day (At).
- Month: Select the Day of month (1-31) and time (At).
-
Custom: Enter a raw cron string value. For more information see Set up a custom delivery schedule.
-
(Optional) Select one or more workbook controls to apply to the exported content. For more information see Apply control values to scheduled reports.
- In the search box below Controls, search for and select the control by control ID.
- Select the control value(s) to apply to the scheduled export.
- Repeat this step to add additional controls.
- (Optional) Select your preferred send conditions. For more information see Schedule exports using conditions.
-
Click Create Schedule.