Integrations

Shopify to BigQuery

Load Shopify orders, customers and products into BigQuery as partitioned tables, with nested order data kept as JSON you can unnest in SQL.

ShopifySourcesyncBigQueryDestination

The pipeline as it appears on the Pipeloom canvas. You can add transforms or triggers on the same canvas later.

What to know about Shopify into BigQuery

Order line items arrive as JSON, not extra tables

BigQuery stores Shopify's nested objects and arrays, such as line items and addresses, in JSON columns. You unnest them with UNNEST(JSON_QUERY_ARRAY(...)) and read fields with JSON_VALUE, so there is no join to a child table.

Edited orders are handled by deduped mode

Orders and customers have an id primary key and an updated_at cursor, so incremental syncs pick up edits. Choose Append + Deduped so an edited order replaces its earlier version in the BigQuery table.

Partition filters keep queries cheap

Tables are partitioned by day on _airbyte_extracted_at and clustered by that column and the primary key. Add a filter on _airbyte_extracted_at when you query large tables so BigQuery scans fewer partitions.

Heavy Shopify streams and BigQuery quotas

Shopify's GraphQL bulk streams run one bulk job at a time per store, and BigQuery's concurrent-query quota is shared across the project. Give Pipeloom its own Job Execution Project ID if analysts run heavy queries in the same project.

Example: one row per order line item

SELECT
  o.id AS order_id,
  JSON_VALUE(li, '$.title') AS product,
  SAFE_CAST(JSON_VALUE(li, '$.quantity') AS INT64) AS quantity
FROM shopify.orders AS o,
  UNNEST(JSON_QUERY_ARRAY(o.line_items)) AS li
WHERE o._airbyte_extracted_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY);

Assumes a dataset named shopify and the default typed tables. Adjust names to match your destination.

Set it up

  1. Create the Shopify sourceAuthenticate with OAuth 2.0, or an API password for a private app. You need: An active Shopify store. If it is a client's store, request access to it first. A custom Shopify app with read_ scopes enabled (for example read_customers, read_orders, read_discounts, read_fulfillments).
  2. Create the BigQuery destinationAuthenticate with A Google Cloud service account with the BigQuery User and BigQuery Data Editor roles, using a JSON key. You need: A Google Cloud project with BigQuery turned on, and a dataset to write to. Create it in the same location as the datasets you will join against. A service account with the BigQuery User and BigQuery Data Editor roles. For production loads, a Cloud Storage bucket for staging with an HMAC key, and the Storage Object Admin role for the service account.
  3. Connect them and pick streamsDraw the edge on the canvas and choose streams and sync modes. Shopify supports full refresh and incremental (append); BigQuery supports every mode: full refresh overwrite, append and overwrite deduped, incremental append and incremental append deduped.
  4. Run, then scheduleThe first sync loads each stream in full. Then set the schedule.

Step-by-step guides: Shopify and BigQuery.

What lands in BigQuery

  • A table per stream with typed columns plus _airbyte_raw_id, _airbyte_generation_id, _airbyte_extracted_at and _airbyte_meta.
  • Tables partitioned by day on _airbyte_extracted_at and clustered by that column and the primary key, so filtering on the partition column scans less data.

Type mapping

  • object and array → JSON
  • string → STRING
  • integer → INT64
  • number → NUMERIC
  • timestamp with time zone → TIMESTAMP
  • timestamp without time zone → DATETIME
  • boolean → BOOL

When Shopify's schema changes

The destination tables are updated as the source changes. Namespaces map to BigQuery datasets, and invalid characters in names are replaced with underscores.

Streams you can sync

Includes Orders, Customers, Abandoned Checkouts, Draft Orders, Fulfillments, Inventory Levels (GraphQL), Metafields (GraphQL), Discount Codes (GraphQL) and more. The full list is in the reference.

What it costs

A sync is metered at 1 credit per vCPU-minute, and a default sync uses 2.5 vCPUs. As an example, not a benchmark, a sync that takes 4 minutes uses 10 credits. Run 24 times a day, that is about 7,200 credits a month, more than Free's 1,500 but within Starter's 12,000 ($19 a month). Your own sync time decides the real figure, so try the calculator with your numbers.

Questions and fixes

Do I need a Cloud Storage bucket?

For production loads, yes: it is the recommended loading method and is faster for large volumes. For a quick test, standard inserts need nothing to stage.

Why do I see a "Caught retryable error" warning?

The connector hit Shopify's rate limit (HTTP 429). It backs off and the sync carries on, so the warning is expected on busy stores.

What does "checkpoint collision is detected" mean?

An incremental GraphQL bulk stream (most often a metafield stream or discount_codes) found more rows sharing one cursor value than the BULK Job checkpoint (rows collected) setting allows. If a later sync succeeded it cleared itself. If not, raise that setting in steps; it must exceed the number of rows sharing the value, up to 1,000,000.

Why does it say another BULK job is running?

Shopify allows one bulk operation at a time per store. Check the operation's progress with Shopify's bulk API, or cancel it, then rerun.

Why does a sync fail with "Quota exceeded for concurrent script queries per project"?

That quota is shared with everything else in the project. Set Job Execution Project ID to a separate project so the connector's jobs count against that quota, or sync fewer streams at once. Data still lands in the dataset under Project ID.

Why does a load fail with "Fail to complete a load job in big query"?

BigQuery load jobs time out after 30 minutes of waiting, and two syncs loading into the same table at once are not supported. Make sure each table is written by one sync, and use an incremental mode to load less per sync.

Should I use the Cloud Storage bucket or standard inserts?

Use the bucket for production because it is faster for large volumes. Standard inserts need nothing to stage and suit small volumes and quick tests. Buckets using customer-managed encryption keys are not supported.

Sync Shopify to BigQuery today

Free forever, no card. Starter is $19 a month for three seats.