About Shopify connector
Etlworks Shopify connector allows fast, real-time access to Shopify. The connector works just like any other database connector.
Etlworks partnered with CData to provide access to the Shopify API using industry-standard JDBC protocol. Read about CData Shopify JDBC connector.
When to use Shopify connector
Create a Private Shopify App
You can follow the procedure below to register an app and obtain the client credentials such as the AppId, Password, and ShopUrl:
- Log in to your Shopify from the admin page and go to Apps.
- Click Manage Private Apps.
- Click Create New Private App.
- In the Description section, enter the app name and contact email.
- In Permissions section, choose the areas of your store you want to grant to your app. The permissions required by our provider to use all the tables and views are: read_customers, write_customers, write_draft_orders, read_draft_orders, read_fulfillments, write_fulfillments, write_inventory, read_inventory, write_marketing_events, read_marketing_events, read_orders, write_orders, read_price_rules, write_price_rules, read_product_listings, write_product_listings, read_products, write_products, read_shopify_payments_payouts.
- Go back to your private apps. The API Key (AppId) of your application and its password (Password) are listed for the app.
Enable Shopify connector for your Etlworks account
Contact firstname.lastname@example.org to enable the connector.
Creating a connection
Step 1. In the Connections window click the
+ button and type in shopify.
Step 2. Enter connection parameters
- App ID - set this to the API Key in your private app settings
- ShopUrl - set this to the full URL of your shop (https://yourshopname.myshopify.com)
- Password - the password
Use Other parameters to specify the connection string options. Read about available connection string options.
Working with Shopify
Shopify data model
The Shopify models entities in the Shopify API as Tables, Views, and Stored Procedures.
Read about Shopify data model.
Stored procedures are available to complement the data available from the Data Model. It may be necessary to update data available from a view using a stored procedure because the data does not provide for direct, table-like, two-way updates. In these situations, the retrieval of the data is done using the appropriate view or table, while the update is done by calling a stored procedure. Stored procedures take a list of parameters and return back a dataset that contains the collection of tuples that constitute the response.
Read about available stored procedures.
To call stored procure from the SQL flow or from Before/After SQL, use EXEC sp_name params=value syntax. Example:
EXEC ListProduct ProductId = 'id'
Extracting data from Shopify
Extracting data from Shopify is similar to extracting data from the relational database.
Step 1. Create Shopify connection which will be used as a source (FROM).
Step 3. Create a flow where the source is a database and the destination is a connection created in step 2, for example, a relational database.
Step 4. Add a new source-to-destination transformation.
Step 5. Select Shopify connection created in step 1 as a source connection and select the data object you are extracting data from.
Step 6. Select TO connection, format (if needed) and object (for example database table) to load data into.
Step 7. Click MAPPING and optionally enter Source Query (you don't need a query if you are extracting data from the Shopify data object unconditionally).
Step 8. Optionally define the per-field mapping.
Step 9. Add more transformations if needed.
Loading data in Shopify
loading data in Shopify is similar to loading data into relational database.
Step 1. Create a source connection and a format (if needed).
Step 2. Create a destination Shopify connection.
Step 3. Create a flow where the destination is a database.
Step 4. Add new source-to-destination transformation.
Step 5. Select FROM and TO connections and objects (also a FROM format if needed).
Step 6. Optionally define the per-field mapping.
Step 7. Add more transformations if needed.
Browsing data in Shopify
You must have Shopify connection to browse objects and run SQL queries.
Use Explorer to browse data and metadata in Shopify as well as execute DML and SELECT queries against Shopify connection.