Shopify to ClickHouse with Bruin
1) Read the analytics marts
T3 is the business-facing layer. These are the tables to connect to a dashboard, scheduled report, or AI data analyst once you have reviewed the metric definitions.
| Asset | Table | Grain and purpose | Refresh strategy |
|---|---|---|---|
t3_daily_revenue.sql | shopify.t3_daily_revenue | One row per UTC order date and currency with revenue, refunds, AOV, and order counts | merge for changed date-currency groups |
t3_daily_kpis.sql | shopify.t3_daily_kpis | One row per UTC order date and currency with customer mix and commerce KPIs | merge for changed date-currency groups |
t3_payment_reconciliation.sql | shopify.t3_payment_reconciliation | One row per UTC order date and currency with financial-status buckets and amounts | merge for changed date-currency groups |
t3_customer_cohorts.sql | shopify.t3_customer_cohorts | One row per first-order month, activity month, and currency for retention | create+replace over complete history |
t3_product_performance.sql | shopify.t3_product_performance | One row per current Shopify product with lifetime completed-order demand | create+replace over complete history |
The refresh choices are intentional. Daily tables can re-compute the small set of dates affected by changed orders. Cohort assignment and product lifetime demand depend on the whole available history, so they rebuild atomically instead.
The template refuses to make financial claims it cannot support. Revenue remains at the Shopify shop-currency grain. Payment reconciliation reflects Shopify order statuses and order-header amounts, not a gateway settlement ledger. Product performance does not invent historical margin from a current inventory cost field.