You can use the data connector for Shopify and directly import data from your Shopify to Treasure Data.

For sample workflows on how to import data from Shopify, view Treasure Boxes.


Prerequisites

  • Basic knowledge of Treasure Data

  • Basic knowledge of Shopify

Obtain Shopify Credentials

To get Shopify Credentials, complete the following steps:

  1. Sign up at https://www.shopify.com/ to create an online store for the user.

  2. Enter the details about the user.

  3. Enter additional details about business.

  4. Create a private app.

  5. The user can see and use the API credentials to store and to connect with different external applications.

store_name Configuration

Shopify translates your free-form Store Name into URL-friendly value. For example, it truncates special characters and replaces spaces with hyphens.
For example: Example Shop-123-!#$ becomes example-shop-123:


You need to use the translated value (in Admin URL, after signing in):


Use the TD Console to Create Your Connection

 Create a New Connection

  1. Go to Integrations Hub > Catalog and search and select Shopify.

  2. Select Create. You are creating an authenticated connection.


The following dialog opens. 

3. Complete the required fields and then select Continue.

4. Name your new Shopify connection. Select Done.


Transfer Your Data to Treasure Data

After creating the authenticated connection, you are automatically taken to the Authentications tab.


  1. Look for the connection you created and select New Source. Edit the following fields.

FieldDescription
Source

The type of object that you want to transfer from Shopify such as products, customers, transactions, orders, inventory, and metafields. The following list identifies supported elements:

  • Objects

    • inventory level

    • inventory_items

    • location

  • Order status

    • open

    • closed

    • canceled

    • any

  • Metafields resource

    • product

    • customer

    • order

    • online_store

    • shop

  • Product resource objects

    • product

    • product_variant

    • product_image

    • collection

  • Order resource objects

    • order

    • draft_order

  • Online_store resource objects

    • blog

    • article

    • page

IncrementalLoad data into Treasure Data incrementally. This selection enables the Incremental field.
Incremental field

The data field used to sort the objects. There are two options: created_at and updated_at.


Data type

The data field used to sort the metadata objects. There are two options: created_at and updated_at.


Start date

The defined the 'start_date' allows you to select only objects that have been created or updated since the 'start_date'. This field is dependent on the Incremental field.


Use precise 'End date'

Specify the End date or leave blank.


Number of days to fetchSpecify how many days, starting from the 'start_date,' that you want to fetch data.
End date

Specify a date by which objects have been updated:

  • If End date is not specified, all the objects up to now are retrieved.

  • If Start time and End time can be combined to specify a specific period, from 'start_date' until 'end_date'.

Inventory Item IDsA list of inventory_ids.
Location IDsA list of location_ids.
Updated at

The time in which `inventory_level` objects have been updated_at, from a specified time until present.



2. Preview your data. To make changes, select Advanced Settings, otherwise select Next.

 3. Select a database and a table where you want to transfer your data.

4. Specify the schedule of the data transfer using the following dialog and select Next.

5. Name your source and select Done.


  • No labels