Exporting your marketing data to Snowflake allows you to integrate it with various applications and run complex data queries. This guide will walk you through the process of setting up and managing your Snowflake exports using Power My Analytics. A Custom plan is required to use Snowflake exports.
How We Store Data in Snowflake Exports
Creating a table
Our Snowflake export feature will create a table with the same name as the Data Builder report you are exporting, with all spaces replaced by underscores (_). The table has columns corresponding to the fields in the Data Builder report being exported.
Partitioning and updating rows
Tables in Snowflake exports are partitioned by month. New data from the export is appended to the appropriate monthly partition, while any changed data will be updated in the affected rows.
Adding columns
When you edit the report in Data Builder to add another field, this field will be added to the table in Snowflake as a new column the next time the export runs. This column will be populated with the field's values going forward. Historical tables from before the new column was added will not include this field; the new column will only appear in the updated table going forward.
Removing fields
When you edit the report in Data Builder to remove an existing field, the corresponding column is not dropped from the table in Snowflake. Instead, the column will remain in the table, and its values will be set to null in all future exports.
Prerequisites
Before you begin:
- Make sure you have a Custom plan with Power My Analytics
-
-
Create a security integration in Snowflake for Power My Analytics
Obtain your Snowflake credentials:
- Account URL
- Client ID
- Client Secret
-
Decide which Snowflake warehouse, database, and schema you're going to use to store your exports
Whitelist the following IPs in Snowflake:
- 35.188.118.242
- 35.209.185.69
Create a Security Integration for Power My Analytics
Before creating a data export from PMA, you'll need to create a new security integration in Snowflake and obtain the Client ID and Client Secret.
This security integration must be created by a user with the Account Admin role in your Snowflake workspace.
First, run the following commands in Snowflake to create the security integration for PMA:
Next, run this command to obtain your Client ID and Client Secret:
- select SYSTEM$SHOW_OAUTH_CLIENT_SECRETS( 'POWERMYANALYTICSOAUTHINTEGRATION' );
Copy your Client ID and Client Secret for use when configuring your Snowflake destination in Power My Analytics.
How to Find Your Snowflake Account URL
You'll need your Snowflake account URL when setting up your Snowflake destination in PMA. To obtain your account URL:
- Go to Snowsight and click on your account name to open the menu.
- Under the Account submenu, click View account details under your account.

- Copy your account URL.
In your PMA hub, go to Reports > Data Builder and find your report. Click the three-dots action menu and select Edit.
-
Go to
Available Data Range and set it to the entire range of data you want to export (up to 2 years for most PMA connectors). To backfill from a specific start date up to yesterday, choose
Custom start to date and enter a start date.

-
Click
Save Changes to save the report.

Step 2: Connect to Snowflake
- Go to Exports > Snowflake in the left sidebar.
- Click + Create Export.

- Click the blue plus button under Destination to add a new destination.

In the Connect Snowflake dialog:
- Enter your Snowflake account URL and the Client ID and Client Secret you obtained after creating the Power My Analytics security integration.
- Click Connect. You will be redirected to the Snowflake authentication page.
- Choose the Snowflake account you just added under Destination.

- Enter your Snowflake warehouse, database, and schema, then click Next.

Step 3: Choose Your Report
- Under Report or Report Group, select either Single report or Group of reports.

- Choose the specific report or report group from the dropdown. Click Next.

- For now, select Monthly under Schedule and choose any day and hour (we'll adjust this later). Click Add to create your export, then click Confirm.

Step 4: Run the Initial Backfill
- On the Exports to Snowflake page, find your new export. Click the play icon to run the export manually.

- The export will begin running, as indicated by the three dots icon. Wait for the three dots icon to change back to a play button, indicating the export has finished.

- Click the paper icon to view the logs and confirm the export was successful.

Step 5: Set Up Rolling Updates
-
Go back to your report in Data Builder. Click the three-dots action menu and select Edit.
Set the Available Data Range to a rolling window (e.g., last 30 days for e-commerce to account for returns).
Then click Save Changes.
- Return to Exports > Snowflake. Find your export and click the pencil icon to Edit Export.

- Under Schedule, choose your desired frequency: monthly, weekly, daily, or hourly. Select the appropriate day/time for the export to run.
- Click Update.

Important: Ensure your report's date range in Data Builder is at least as long as the refresh period in the Snowflake export in order to avoid missing data. For example, if your report's date range is one week but your export refreshes monthly, your export will fail to include data from before the last week of the month.
Your export will now run automatically at the scheduled time, keeping your Snowflake database up-to-date with the latest data from your PMA reports.
Troubleshooting
If you encounter any issues with your exports:
- Check the export logs by clicking the paper icon next to your export.
- Verify that your Snowflake credentials are correct and that the PMA IP addresses are whitelisted.
- Ensure your report's date range aligns with or exceeds your export schedule to prevent data gaps.
Error: "Invalid consent request"
If you receive the error message "Invalid consent request" when attempting to use your Snowflake export destination, your default user role may be set to an administrative role of ACCOUNTADMIN, ORGADMIN, GLOBALORGADMIN, or SECURITYADMIN. Users with these default roles will be unable to connect Snowflake to Power My Analytics.
Change the default role for your Snowflake user to a non-administrative role by running the following command in Snowflake:
- ALTER USER <user_name> SET DEFAULT_ROLE = 'PUBLIC';