Repository navigation
0.7.2
Ossie schema 0.2.0.dev0. Tested with dactopus-ossie-clickhouse 0.12.0,
dbt v2 (dbt-oss 2.0.8) and dbt v1 (dbt-core 1.11 with
dbt-clickhouse 1.10) on ClickHouse 26.9. The Shopify input gains a
column, and refunds and sales_events need the rebuild the first entry
describes; every other table builds the same as in 0.7.1.
Fixed
-
Shopify: a refund is dated by its
processedAt, the date Shopify's
sales reports count it on, instead of itscreatedAt
(#45).
The two are equal for a refund made in the admin. A refund imported
with a pastprocessedAt, as a store that moves its history to
Shopify records its returns, counted on the day of the import in
refunds.refund_dateandsales_events.event_date, and its month's
net sales were too high. Therefundsinput table has a new column,
processed_at, which a loader must deliver; the README's export
query reads it. A deployment adds it to the input, giving the refunds
already loaded theircreated_at:ALTER TABLE shopify_raw.refunds ADD COLUMN processed_at DateTime('UTC') DEFAULT created_at AFTER created_at; ALTER TABLE shopify_raw.refunds MATERIALIZE COLUMN processed_at SETTINGS mutations_sync = 1; ALTER TABLE shopify_raw.refunds MODIFY COLUMN processed_at REMOVE DEFAULT;
A store with imported refunds then exports its orders again from
before the first import, so that those refunds arrive with their
processedAt. Last,dbt build --full-refresh --select refunds+
rebuildsrefundsandsales_events: an incremental run keeps the
old dates of the refunds it does not reread, with no error. -
The descriptions of
refunds.refund_dateandrefund_timesay which
date they hold: the date the store's reports date the refund by, at
Shopify the date it was processed, for an imported refund its past
date and not the day it was recorded, asorder_datesays for orders. -
The Shopify and WooCommerce packages set
join_use_nulls = 0in their
queries. Their LEFT JOINs count on a missing match giving 0 (an order
without gift cards, a refund without lines); a server or profile that
sets it to 1 gave NULL totals and the build failed on
sales_events.amount.tests/profiles.ymlsets 1, so CI builds
against the setting the packages must not depend on.