Skip to content

Add Shopify ClickHouse template - #2467

Merged
arsalann merged 1 commit into
mainfrom
arsalann/shopify-clickhouse-template
Jul 29, 2026
Merged

Add Shopify ClickHouse template#2467
arsalann merged 1 commit into
mainfrom
arsalann/shopify-clickhouse-template

Conversation

@arsalann

@arsalann arsalann commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a generic Shopify-to-ClickHouse template with raw ingestion, conformed commerce models, and reporting marts
  • document setup, connection conventions, project structure, and customization guidance
  • add the template to the documentation catalog and cover bruin init shopify-clickhouse with a regression test

Validation

  • make format
  • make test
  • validated all 16 template assets with Bruin using a temporary clean connection config
  • npm run docs:build

@arsalann
arsalann marked this pull request as ready for review July 28, 2026 15:23
Comment on lines +181 to +190
WITH raw_lines AS (
SELECT
o.id AS order_id,
o.updated_at AS order_updated_at,
item
FROM shopify.t1_orders AS o
ARRAY JOIN JSONExtractArrayRaw(ifNull(o.line_items, '[]')) AS item
WHERE o.updated_at BETWEEN
parseDateTime64BestEffort('{{ start_timestamp }}', 6, 'UTC')
AND parseDateTime64BestEffort('{{ end_timestamp }}', 6, 'UTC')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Removed order lines remain stale

When an order edit removes a line item, raw_lines emits only the items still present in the updated payload, so the key-based merge never deletes the removed line. The stale row continues contributing to downstream product and revenue metrics and can fail the blocking order-header reconciliation checks.

Prompt To Fix With AI
This is a comment left during a code review.
Path: templates/shopify-clickhouse/assets/t2/t2_order_line_items.sql
Line: 181-190

Comment:
**Removed order lines remain stale**

When an order edit removes a line item, `raw_lines` emits only the items still present in the updated payload, so the key-based merge never deletes the removed line. The stale row continues contributing to downstream product and revenue metrics and can fail the blocking order-header reconciliation checks.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Conductor

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Fix All in Conductor

Prompt To Fix All With AI
### Issue 1
templates/shopify-clickhouse/assets/t2/t2_order_line_items.sql:181-190
**Removed order lines remain stale**

When an order edit removes a line item, `raw_lines` emits only the items still present in the updated payload, so the key-based merge never deletes the removed line. The stale row continues contributing to downstream product and revenue metrics and can fail the blocking order-header reconciliation checks.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "Add Shopify ClickHouse template" | Re-trigger Greptile

@arsalann
arsalann merged commit b18fe83 into main Jul 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants