The Snowflake connector exports your data from the app to tables in your Snowflake database every 5 minutes: orders, shipping requests, fulfillments, transfers, purchases, arrivals, receipts, products, inventory changes, locations, and exceptions.
With this connector, you can:
- Export orders, shipping requests, and fulfillments to Snowflake.
- Export transfers, purchases, arrivals, and receipts.
- Export products, inventory changes, locations, and exceptions.
- Mask personal information on orders, shipping requests, and fulfillments.
Setup
Before you begin, make sure you have:
- Someone who can use the ACCOUNTADMIN role in Snowflake, to create a user, role, warehouse, and network policy.
- Your Snowflake account URL, in the form https://<orgname>-<accountname>.snowflakecomputing.com. In Snowsight, open the account menu and select View account details to copy it.
- The Pipe17 IP address to allow in your Snowflake network policy. See Whitelisted IPs for Connectors.
Note: Snowflake no longer allows sign-in with only a password. Connect with a programmatic access token (PAT) on a service user.
Set up Snowflake for Pipe17
- In Snowsight, open a SQL worksheet, and run the setup below. Replace <Pipe17 IP address> with the address from Whitelisted IPs for Connectors. You can change the names.
- Copy the token_secret from the result of the last statement. Snowflake shows it only once.
USE ROLE ACCOUNTADMIN;
CREATE DATABASE IF NOT EXISTS PIPE17_DB;
CREATE SCHEMA IF NOT EXISTS PIPE17_DB.PIPE17;
CREATE WAREHOUSE IF NOT EXISTS PIPE17_WH WAREHOUSE_SIZE = 'XSMALL' AUTO_SUSPEND = 60 AUTO_RESUME = TRUE;
CREATE ROLE IF NOT EXISTS PIPE17_ROLE;
GRANT USAGE ON WAREHOUSE PIPE17_WH TO ROLE PIPE17_ROLE;
GRANT USAGE ON DATABASE PIPE17_DB TO ROLE PIPE17_ROLE;
GRANT USAGE, CREATE TABLE ON SCHEMA PIPE17_DB.PIPE17 TO ROLE PIPE17_ROLE;
CREATE NETWORK RULE PIPE17_DB.PIPE17.PIPE17_ALLOW MODE = INGRESS TYPE = IPV4 VALUE_LIST = ('<Pipe17 IP address>');
CREATE NETWORK POLICY PIPE17_POLICY ALLOWED_NETWORK_RULE_LIST = ('PIPE17_DB.PIPE17.PIPE17_ALLOW');
CREATE USER IF NOT EXISTS PIPE17_SVC TYPE = SERVICE DEFAULT_ROLE = PIPE17_ROLE DEFAULT_WAREHOUSE = PIPE17_WH DEFAULT_NAMESPACE = PIPE17_DB.PIPE17;
GRANT ROLE PIPE17_ROLE TO USER PIPE17_SVC;
ALTER USER PIPE17_SVC SET NETWORK_POLICY = PIPE17_POLICY;
ALTER USER PIPE17_SVC ADD PROGRAMMATIC ACCESS TOKEN PIPE17_PAT ROLE_RESTRICTION = 'PIPE17_ROLE' DAYS_TO_EXPIRY = 365;Note: A PAT works only for a user that has a network policy that allows Pipe17’s IP address. The token above expires after 365 days. Create a new one and update the app before then. The app shows an exception when 28 days or fewer remain.
To learn more, see Snowflake’s Using programmatic access tokens for authentication and Controlling network traffic with network policies.
Connect Snowflake in the app
- Navigate to Integrations and click Add integration.
- Search for Snowflake and select it. The Connect Snowflake pop-up opens.
- In Specify URL to access Snowflake data, enter your account URL. Don’t use a Snowsight browser address (app.snowflake.com).
- Enter the user name (PIPE17_SVC above), and paste the token in Specify Snowflake PAT or password.
- Enter the database, schema, and warehouse names (PIPE17_DB, PIPE17, and PIPE17_WH above).
- Click Connect.
Note: If you don’t have your credentials yet, click Add without credentials. The integration is added but doesn’t sync until you enter them on its Connection Details tab and click Save.
Confirm the connection
- Navigate to Integrations. Snowflake shows Connected. If it shows Error or Not Configured, open it, check the connection on the Connection Details tab, and click Save.
- Make sure the switch on the integration’s row is on.
- Test with one order. On the Settings tab, set Only push orders created after to the current date and time, turn on Push orders to Snowflake, and click Save. Create or update a test order in the app.
- After 5 to 10 minutes, in Snowsight, run SELECT * FROM ORDERS WHERE ORDERID = '<order ID>'; in your database and schema. The order’s lines are in ORDERS_LINES.
- When the test looks right, set the dates you want for each data type, and turn on the other switches.
Note: The app creates and owns the tables, plus an empty _RAW staging table for each. Don’t rename or change them. Inventory is exported as change records, not a current snapshot.
Note: If you leave an Only push … created after date empty, the first export may include your full history, which uses more warehouse credits.
Note: Mask Personal Identifiable Information (PII) in objects reported to Snowflake masks orders, shipping requests, and fulfillments only. Purchases, transfers, arrivals, and locations still include names and addresses.
Settings
These settings are on the integration’s Settings tab.
| Setting | Options/Default |
|---|---|
|
Mask Personal Identifiable Information (PII) in objects reported to Snowflake When ON, PII such as names, addresses etc, will be masked with '*' for orders, shipments and fulfillments |
On/Off. Default: Off |
| Push locations to Snowflake | On/Off. Default: Off |
| Only push locations created after | Optional |
| Force locations resync | On/Off. Default: Off |
| Push orders to Snowflake | On/Off. Default: Off |
| Only push orders created after | Optional |
| Force orders resync | On/Off. Default: Off |
| Push shipping requests to Snowflake | On/Off. Default: Off |
| Only push shipping requests created after | Optional |
| Force shipping requests resync | On/Off. Default: Off |
| Push fulfillments to Snowflake | On/Off. Default: Off |
| Only push fulfillments created after | Optional |
| Force fulfillments resync | On/Off. Default: Off |
| Push transfers to Snowflake | On/Off. Default: Off |
| Only push transfers created after | Optional |
| Force transfers resync | On/Off. Default: Off |
| Push purchases to Snowflake | On/Off. Default: Off |
| Only push purchases created after | Optional |
| Force purchases resync | On/Off. Default: Off |
| Push arrivals to Snowflake | On/Off. Default: Off |
| Only push arrivals created after | Optional |
| Force arrivals resync | On/Off. Default: Off |
| Push receipts to Snowflake | On/Off. Default: Off |
| Only push receipts created after | Optional |
| Force receipts resync | On/Off. Default: Off |
| Push products to Snowflake | On/Off. Default: Off |
| Only push products created after | Optional |
| Force products resync | On/Off. Default: Off |
| Push inventory to Snowflake | On/Off. Default: Off |
| Only push inventory created after | Optional |
| Force inventory resync | On/Off. Default: Off |
| Push exceptions to Snowflake | On/Off. Default: Off |
| Only push exceptions created after | Optional |
| Force exceptions resync | On/Off. Default: Off |
Troubleshooting
- Connect fails with “Incorrect username or password was specified”
Check the user name, and paste a current PAT. Snowflake blocks password-only sign-in. - Connect fails because the IP address isn’t allowed
Add Pipe17’s IP address to the network rule in the user’s network policy. - Exports stop with “Programmatic access token is expired”
Create a new PAT for the user, and enter it on the Connection Details tab. - Connect fails with “No active warehouse”
Enter a warehouse in Specify Snowflake Warehouse name (optional), or set the user’s default warehouse, and grant USAGE on it to the user’s role. - Connect fails because the database or schema doesn’t exist or isn’t authorized
Create them, grant USAGE on both and CREATE TABLE on the schema to the user’s default role, and check the names match exactly. - Connect fails with an account not found error
Use the account URL from View account details in Snowsight.
Need Help?
If you need additional assistance:
- Use Ask Pippen, our AI agent, located at the top of the platform page.
- Submit a support request with as much relevant detail as possible. Learn how to submit a request.
We’re here to help you succeed with your operations.
Comments
0 comments