Skip to content

0.7.2

Choose a tag to compare

@ekut ekut released this 27 Oct 06:51
· 132 commits to main since this release
7c743ad

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 its createdAt
    (#45).
    The two are equal for a refund made in the admin. A refund imported
    with a past processedAt, as a store that moves its history to
    Shopify records its returns, counted on the day of the import in
    refunds.refund_date and sales_events.event_date, and its month's
    net sales were too high. The refunds input 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 their created_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+
    rebuilds refunds and sales_events: an incremental run keeps the
    old dates of the refunds it does not reread, with no error.

  • The descriptions of refunds.refund_date and refund_time say 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, as order_date says for orders.

  • The Shopify and WooCommerce packages set join_use_nulls = 0 in 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.yml sets 1, so CI builds
    against the setting the packages must not depend on.