Setting up the Openflow Connector for Shopify¶
Note
This connector is subject to the Snowflake Connector Terms.
This topic describes the steps to set up the Openflow Connector for Shopify.
Prerequisites¶
-
Set up your runtime deployment.
-
If you are using Openflow - Snowflake Deployments, ensure that you have reviewed the required domain configuration and have granted access to the domains required by the connector.
-
Ensure you have access to the Openflow admin role or a similar role you use to manage Openflow.
-
If you’re creating a Snowflake service user to manage the connector, set up key pair authentication. For more information, see key pair authentication.
Required endpoints¶
The following endpoint is required for the connector to function:
<your_store>.myshopify.com:443(for example,mystore.myshopify.com:443)
If you are using Openflow - BYOC Deployments, configure your cloud network egress to allow HTTPS (port 443) access to this endpoint. If you are using Openflow - Snowflake Deployments, you must create a network rule and an external access integration (EAI). For more information, see Create a network rule (Openflow - Snowflake Deployments only).
Set up Shopify¶
A Shopify store administrator must create a custom app and generate an Admin API access token for the connector to authenticate.
-
Log in to your Shopify admin at
https://admin.shopify.com/store/<your_store>. -
Navigate to Settings » Apps » Develop apps.
-
Select Create an app. Provide an app name and select a developer.
-
On the Configuration tab, select Configure Admin API scopes.
-
Select the
read_*scopes corresponding to the object types you want to replicate. For example:read_orders: orders, transactions, fulfillments (access limited to the last 60 days by default; request theread_all_ordersscope in the Partner Dashboard to access the full order history)read_products: products, product variants, collectionsread_customers: customers, segmentsread_inventory: inventory items, locationsread_merchant_managed_fulfillment_orders: fulfillment orders
For the full list of available scopes, see the Shopify access scopes reference.
Note
Grant only the scopes required for the objects you intend to replicate. You can update scopes later by editing the app configuration.
Some GraphQL fields require write scopes to read (for example,
marketingUnsubscribeUrlon theCustomerobject requireswrite_customers). If you don’t grant the corresponding write scope, the Shopify API returns an error for that field. To avoid this, either omit the field from thegraphqlFieldslist in the Object Definitions Override parameter, or add it toignoredFields. Note thatignoredFieldsworks on top-level field names only. For nested fields, you must remove them from thegraphqlFieldssub-selection. -
Select Save.
-
Go to the API credentials tab and select Install app. Confirm the installation.
-
Copy the Admin API access token and store it in a secure location. You need this token when configuring the connector.
Warning
The access token is displayed only once. If you lose it, you must uninstall and reinstall the app to generate a new token.
For more information, see Generate access tokens for custom apps in the Shopify developer documentation.
Set up your Snowflake account¶
As an Openflow administrator, perform the following tasks to set up your Snowflake account.
Create a Snowflake service user (Openflow - BYOC Deployments only)¶
Note
This step is only required if you are deploying the connector in Openflow - BYOC Deployments. It isn’t needed for Openflow - Snowflake Deployments.
-
Create a service user:
-
Store the private key for that user in a file to supply to the connector’s configuration. For more information, see key pair authentication.
Create database, schema, and warehouse¶
-
Create the destination database:
-
Create the destination schema:
-
Create a role for the connector and grant the required privileges:
-
Create a warehouse (or use an existing one) and grant usage privileges:
-
If using Openflow - BYOC Deployments, assign the role to the service user:
Create a network rule (Openflow - Snowflake Deployments only)¶
Note
If your runtime executes in Openflow - BYOC Deployments, you don’t need to create an External Access Integration (EAI). Instead, configure your cloud network egress to allow HTTPS (port 443) access to your Shopify store domain.
To allow the connector to call the Shopify API from a Snowflake-hosted runtime, create a network rule and an external access integration (EAI), and then grant the Snowflake role usage privileges on the EAI.
-
Create a network rule:
-
Create an External Access Integration:
-
Grant your Snowflake role USAGE on the integration:
Install the connector¶
To install the connector, do the following as a data engineer:
-
Navigate to the Openflow overview page. In the Featured connectors section, select View more connectors.
-
On the Openflow connectors page, find the connector and select Add to runtime.
-
In the Select runtime dialog, select your runtime from the Available runtimes drop-down list and click Add.
Note
Before you install the connector, ensure that you have created a database and schema in Snowflake for the connector to store ingested data.
-
Authenticate to the deployment with your Snowflake account credentials and select Allow when prompted to allow the runtime application to access your Snowflake account. The connector installation process takes a few minutes to complete.
-
Authenticate to the runtime with your Snowflake account credentials.
The Openflow canvas appears with the connector process group added to it.
Configure the connector¶
To configure the connector, perform the following steps:
- Right-click on the added connector process group and select Parameters.
- Populate the required parameter values as described in the following sections.
Shopify parameters¶
| Parameter | Description |
|---|---|
| Shop Domain | The Example: |
| Access Token | The Admin API access token generated from the custom app in your Shopify store. Stored securely as a sensitive parameter. |
| Shopify API Version | The Shopify Admin API version to use for requests. Default: |
| Objects to Sync | Comma-separated or newline-separated list of Shopify object types to replicate. Case-insensitive. Each value must correspond to a query endpoint in the Shopify Admin GraphQL API (for example, Default: |
| Objects to Track for Deletes | Comma-separated or newline-separated list of Shopify object types to monitor for deletions through the Events API. Each type is polled independently. Types not found in the registry are skipped. Leave empty to disable delete tracking entirely. Example: |
| Sync Schedule | How frequently the connector polls Shopify for new or updated data. Uses NiFi scheduling syntax. Example: |
| Deletes Schedule | How frequently the connector polls the Shopify Events API for deletion events. Uses NiFi scheduling syntax. Set this to a longer interval than the sync schedule to reduce API cost. Example: |
| Object Definitions Override | Optional JSON array to add new object definitions or override existing ones in the built-in catalog. Each element fully replaces the catalog entry for that For more information, see Object definition overrides. |
| Enable Introspection | When Default: |
| Ignore Deprecated Fields | When Default: |
Snowflake destination parameters¶
| Parameter | Description |
|---|---|
| Snowflake Authentication Strategy | Authentication strategy for the connector to connect to Snowflake.
|
| Snowflake Account Identifier | Snowflake account identifier, formatted as Example: |
| Snowflake Username | The Snowflake user for authentication. Required when the authentication strategy is KEY_PAIR. |
| Snowflake Private Key | PEM-encoded private key content (PKCS8 format) for Snowflake key pair authentication. Required when the authentication strategy is Either this parameter or Snowflake Private Key File must be defined. |
| Snowflake Private Key File | Alternative to Snowflake Private Key. Upload the private key file by selecting the Reference asset checkbox, uploading the file as an asset, and selecting the asset as the value for the parameter. Either this parameter or Snowflake Private Key must be defined. |
| Snowflake Private Key Password | Password to decrypt the Snowflake private key, if the key is encrypted. Only applicable when the authentication strategy is KEY_PAIR. |
| Snowflake Role | The Snowflake role used for table creation, data ingestion, and access verification. |
| Destination Database | Name of the destination database in Snowflake. The database must already exist before starting the connector. |
| Destination Schema | Name of the destination schema in Snowflake. The schema must already exist before starting the connector. |
| Snowflake Warehouse | The Snowflake warehouse used for table management operations such as CREATE TABLE and MERGE. |
Run the flow¶
- Right-click on an empty area of the canvas and select Enable all Controller Services.
- Right-click on the connector process group and select Start.
The connector starts querying the Shopify Admin API and loading data into Snowflake.
Next steps¶
- For information on customizing which fields are extracted and registering custom object types, see Object definition overrides for the Openflow Connector for Shopify.
- For information on forcing a full reload of connector state, see Maintaining the Openflow Connector for Shopify.
- For information on monitoring the flow, see Monitor the flow.