Guide · Analytics and metrics

Shopify data in a warehouse: ETL, BigQuery and ClickHouse

How to get Shopify data into a warehouse: ETL explained, loading into BigQuery or ClickHouse, the pitfalls of the Shopify API, tool types and when it pays.

Updated · 9 min read

By the ROASaurus team

The short answer
  • ETL (extract, transform, load) copies data from Shopify, ad platforms and other tools into one warehouse where you can query it together with SQL.
  • A warehouse pays when questions cross sources (profit per campaign, LTV by first product, several stores) and spreadsheets stop scaling.
  • Shopify data is harder to load than it looks: API rate limits, nested orders, edits and refunds after the fact, the 60-day order limit without extra access, currencies and time zones.
  • BigQuery is the usual first choice (serverless, SQL, native GA4 export); ClickHouse suits large event volumes but needs care with updates.
  • Options range from CSV exports and managed connectors to custom pipelines and analytics tools that export modelled tables.

As a Shopify store grows, its questions outgrow the reports of any single tool. Which campaigns bring customers who come back? What is the profit per channel after shipping and fees? How do three stores in three currencies compare? Answering those needs the data in one place, and that place is usually a data warehouse. This guide explains ETL for Shopify, when a warehouse makes sense, how to load data into BigQuery and ClickHouse, the types of tools that do it, and the pitfalls.

Understanding ETL for Shopify stores

ExtractRead orders, products, customers and refunds from the Shopify Admin API; spend from ad platforms; sessions from GA4.
TransformFlatten nested orders, convert currencies, align time zones, join costs, remove personal data.
LoadWrite tables into BigQuery, Snowflake, Redshift, ClickHouse or files in cloud storage.
ETL. In ELT the raw data is loaded first and transformed inside the warehouse with SQL.

ETL stands for extract, transform, load. Most modern setups are really ELT: they load raw data into the warehouse and transform it there with SQL (often with a tool such as dbt), because warehouse compute is cheap and raw data can be re-modelled later. The distinction matters less than the result: tables you can trust and query.

A data warehouse is a database built for analysis: it stores large tables in columns, scans them fast and is queried with SQL. BigQuery, Snowflake, Redshift and ClickHouse are the common ones; a data lake of Parquet files in S3, Google Cloud Storage or Azure Blob is a cheaper variant that most warehouses can read.

Common use cases for ETL in Shopify

  • Blended marketing reports: spend from every ad platform next to Shopify orders, with one definition of revenue.
  • Profit reporting: product costs, shipping, fees and refunds joined per order, then rolled up per product, channel and month.
  • Customer analytics: cohorts, lifetime value, repeat rate by first product or acquisition channel over years of history.
  • Several stores and markets: one table across stores, currencies converted, time zones aligned.
  • BI dashboards: Looker Studio, Looker, Power BI, Tableau or Metabase on top of clean tables.
  • Data science: demand forecasts, churn models, marketing mix models.

Step by step: ETL for a Shopify store

  1. Write down the questions

    Five questions the warehouse must answer. They decide which sources and tables you need; "everything" is not a plan.

  2. List the sources

    Shopify (orders, line items, refunds, products, customers), ad platforms (spend per campaign and day), GA4 (sessions), email, and your cost data.

  3. Choose how to extract

    Shopify's Admin GraphQL API (with bulk operations for large exports), webhooks for changes as they happen, or a connector that does both.

  4. Choose the destination

    BigQuery, Snowflake, Redshift or ClickHouse, or files in cloud storage. Pick the one your team or agency already knows.

  5. Model the data

    One row per order, per order line, per refund and per ad campaign per day. Decide the store currency, time zone and revenue definition once.

  6. Load incrementally

    After the first backfill, load only what changed (by updated time), and replace whole days so edits and refunds overwrite old values.

  7. Check quality

    Compare order counts and net sales per day with Shopify's reports; alert when a load fails or a day is missing.

  8. Build the reports

    Dashboards and saved queries on top of the modelled tables, not on raw API output.

Shopify ETL vs manual reporting

Manual reporting (exports and spreadsheets)ETL into a warehouse
Effort per reportHours each timeSetup once, then minutes
HistoryWhat fits in a spreadsheetYears of orders and events
Joining sourcesLookups by hand, error-proneSQL joins on ids
FreshnessAs old as the last exportHourly or daily
ConsistencyEach person's own formulasOne model, one definition
CostStaff timeTool and warehouse fees, plus setup
SuitsA small store with a few questionsGrowing stores, several stores, analysts on the team

Swipe the table sideways to see every column.

When does a warehouse make sense?

Signs that a store has outgrown its tools' reports:

  • You export from three or more tools every week and combine them in a spreadsheet.
  • Questions need more history than your tools keep, such as LTV over two years.
  • You run several stores or markets and want one view.
  • An analyst or agency wants SQL access to the data.
  • You want to build your own models (forecasting, MMM) or feed a BI tool.

If none apply, a good analytics tool with exports is usually enough, and cheaper.

Why use BigQuery with Shopify?

  • Serverless: no servers to run; you pay for storage and the data each query scans (or a flat-rate reservation).
  • SQL: standard SQL, so any analyst can query it.
  • GA4 export: GA4 exports raw events to BigQuery natively, including on free standard properties (with a daily event limit), so Shopify orders and GA4 events can sit side by side.
  • Google tools: Looker Studio, Sheets (connected sheets) and Vertex AI read BigQuery directly.
  • Partitioning: tables partitioned by day keep queries on recent data cheap.

Why connecting Shopify to BigQuery is not simple

ProblemWhy it happensHow to handle it
Rate limitsThe Admin GraphQL API limits query cost per secondUse bulk operations for history, incremental queries after
Only 60 days of ordersApps see the last 60 days unless granted the read_all_orders scopeRequest read_all_orders for the backfill
Nested dataAn order holds line items, discounts, shipping lines, refunds and transactionsFlatten into separate tables joined by order id
Changes after the factOrders are edited, refunded, cancelled and fulfilled days laterReload by updated time and replace whole days
CurrenciesShop currency, presentment currency and ad account currencies differStore both, convert with daily rates
Time zonesAPI times are UTC; Shopify reports use the store time zoneAdd a store-local day column and report on it
Personal dataOrders contain names, emails and addressesHash or drop them unless there is a clear need and legal basis
No costs in ShopifyShipping invoices, fees and ad spend live elsewhereLoad them as their own sources and join

Swipe the table sideways to see every column.

How to load Shopify data into BigQuery: the options

  1. CSV exports

    Export orders and products from Shopify admin and upload to BigQuery. Free and fine for a one-off analysis; not repeatable.

  2. Spreadsheet in between

    A Google Sheet filled by an app or script, queried as an external table. Simple, but slow and limited in size.

  3. Managed ELT connectors

    Services that read the Shopify API and load raw tables on a schedule. Little work, priced by rows or volume; you still model the raw tables yourself.

  4. Custom pipeline

    Your own code calling the Admin API (bulk operations plus webhooks) and BigQuery load jobs. Full control; you maintain it when Shopify changes the API.

  5. Analytics tool with a warehouse export

    A tool that already joins orders, costs, spend and attribution exports modelled tables. Less raw detail, but the hard modelling is done.

Why connecting Shopify to ClickHouse is not straightforward

  1. Few direct connectors

    Fewer ready-made Shopify integrations load into ClickHouse than into BigQuery or Snowflake.

  2. Updates are expensive

    ClickHouse is built for appending. Orders change after they are placed, so you need a table engine that keeps the latest version (ReplacingMergeTree with a version column) and queries that account for it.

  3. Nested JSON

    Shopify orders are deeply nested; they need flattening into line, refund and transaction tables before they are fast to query.

  4. Operations

    Self-hosted ClickHouse needs someone to run it; ClickHouse Cloud removes that but adds a bill.

Options for loading Shopify data into ClickHouse

  • Through files: write Parquet or JSON files per day to S3 or Google Cloud Storage and read them with ClickHouse's s3 table function, or ingest them continuously (S3Queue, or ClickPipes on ClickHouse Cloud).
  • Through an ELT connector that supports ClickHouse as a destination.
  • Through a stream: Shopify webhooks into a queue (Kafka, for example) and from there into ClickHouse.
  • Custom code: read the Admin API and insert in batches.
ClickHouse s3 table function (example bucket and keys)
-- Read one day of exported orders (Parquet) from S3 into ClickHouse
INSERT INTO orders
SELECT *
FROM s3('https://my-bucket.s3.eu-west-1.amazonaws.com/shop/orders/2026-11-24.parquet',
        'AWS_KEY_ID', 'AWS_SECRET', 'Parquet');

Types of Shopify ETL tools

TypeExamplesStrengthsTrade-offs
Managed ELTFivetran, Airbyte Cloud, Stitch, HevoMany sources, little maintenanceRaw tables to model; volume-based pricing
Open-source ELTAirbyte (self-hosted), MeltanoNo licence fee, full controlYou run and update it
Spreadsheet connectorsAdd-ons that pull Shopify into SheetsQuick for small storesRow limits, slow, fragile
Analytics tools with exportsProfit and attribution tools that export to a warehouseCosts and attribution already joinedTheir model, their tables
Custom pipelineYour own code on the Admin APIExactly what you needEngineering time, API changes
Tool names as examples of each type, not a ranking. Check current Shopify and destination support with each vendor.

Swipe the table sideways to see every column.

How ETL tools work with Shopify data

  • Access: the tool installs as a Shopify app with read scopes (orders, products, customers; read_all_orders for history).
  • Backfill: a first run reads history, usually through bulk operations that export large result sets as files.
  • Incremental sync: later runs ask for records updated since the last run, or listen to webhooks.
  • Schema mapping: nested objects become child tables; new fields add columns.
  • Scheduling and retries: hourly or daily runs, with retries when the API throttles.
A first query once orders and ad spend share a warehouse
-- Net revenue, contribution margin and ad spend per day (BigQuery, example tables)
SELECT o.order_day,
       SUM(o.revenue)             AS revenue,
       SUM(o.contribution_margin) AS contribution_before_ads,
       ANY_VALUE(s.spend)         AS ad_spend
FROM shop.orders o
LEFT JOIN (SELECT day, SUM(spend) AS spend FROM shop.ad_spend GROUP BY day) s
  ON s.day = o.order_day
GROUP BY o.order_day
ORDER BY o.order_day DESC;

Shopify data in a warehouse with ROASaurus

ROASaurus already joins your orders, product costs, shipping, fees, ad spend and attribution. Instead of rebuilding that model, you can export its tables to your own warehouse, query them in the app, or pull them into Sheets and Looker Studio.

In ROASaurusConnections › Warehouse
  1. Open Connections › Warehouse and add an export to BigQuery, Snowflake, Redshift, S3, Google Cloud Storage or Azure Blob (files as Parquet, gzip JSON lines or CSV, one file per day).
  2. Pick the tables: orders (with profit and attribution), order items (with product cost), ad spend per platform, campaign and day, touches (journeys), customers (with LTV and predicted LTV) and the daily P&L.
  3. Choose daily or hourly and how many days of history the first run loads. Each run replaces the store-local days that changed, so a run can repeat safely; customers are a full snapshot.
  4. Personal data is not exported: customers are identified by platform id or email hash. Tables are created for you and new columns are added when ROASaurus adds fields.
  5. For quick questions without a warehouse, use Reports › SQL: read-only SQL on this store's views (orders, order items, refunds, customers, ad spend, touches, events, products and more), with charts, saved queries and CSV download.
  6. Use Connections › Google Sheets & Looker Studio to sync data into a spreadsheet or connect Looker Studio.

ROASaurus has no ClickHouse destination; ClickHouse can read the daily Parquet files from S3 or Google Cloud Storage with its s3 table function.

Start freeOpen the live demo14-day trial of every feature, no credit card.

Sources

  1. Shopify Dev: Perform bulk operations with the GraphQL Admin API
  2. Shopify Dev: API rate limits
  3. Shopify Dev: Access scopes
  4. Google Analytics Help: BigQuery Export
  5. Google Cloud: Introduction to loading data into BigQuery
  6. ClickHouse Docs: s3 table function
  7. ClickHouse Docs: ReplacingMergeTree

More guides on analytics and metrics · All guides

FAQ

Questions, answered

More answers in the FAQ and the help center.

What is ETL for Shopify?

Extracting data from Shopify (and ad platforms, GA4 and other tools), transforming it into clean tables, and loading it into a warehouse where it can be queried with SQL. Many setups load first and transform inside the warehouse (ELT).

Is BigQuery the right fit for my Shopify brand?

It fits when you want SQL access to several sources, long history or a BI tool, and especially if you already use GA4's BigQuery export. A small store with simple questions is usually better served by its analytics tools' reports and exports.

How do I connect Shopify to BigQuery?

Use a managed ELT connector, write your own pipeline on the Shopify Admin API with BigQuery load jobs, or use an analytics tool that exports modelled tables to BigQuery. CSV uploads work for one-off analyses.

Why can't I export orders older than 60 days through the API?

By default Shopify apps can only read the last 60 days of orders. The app needs the read_all_orders scope, which Shopify grants on request, to read the full history.

Can I load Shopify data into ClickHouse?

Yes, through files in S3 or Google Cloud Storage read with the s3 table function, an ELT tool with a ClickHouse destination, a webhook stream or custom code. Plan for order updates with ReplacingMergeTree.

What does a warehouse cost for a Shopify store?

Warehouse storage and queries for one store's orders are usually small; the larger costs are the ETL tool and the time to model the data. Check each vendor's current pricing.

Should I export raw data or modelled tables?

Both have a place. Raw tables let you re-model later; modelled tables (one row per order with revenue, costs and channel) answer business questions directly.

Every sale, traced to the ad that earned it

Server-side tracking, profit and lifetime value in one app. Free plan, no credit card.