[source-shopify] transactions (GraphQL BULK): records with created_at older than the saved state are dropped; lookback_window_in_days does not apply to the record filter
Connector Name
source-shopify
Connector Version
4.1.0
What step the error happened?
During the sync
Relevant information
Summary
transactions (TransactionsGraphql, GraphQL BULK) builds its slices on the parent orders.updated_at but uses the child created_at as its cursor. When records are read, filter_records_newer_than_state keeps a transaction only if its created_at is greater than or equal to the saved state. A transaction that first becomes visible to the BULK query after the saved state has already moved past its created_at is therefore dropped, and no later incremental sync can pick it up, since its created_at never changes.
lookback_window_in_days (3.4.0, #76192) does not cover this case: it only moves the start of the BULK slice. The record filter still compares against the unadjusted state, so the order is re-fetched but its older transactions are filtered out again.
Code path (master @ a300525)
- cursor is
created_at: streams.py L387-L389 - BULK slices filter on
updated_at(inherited): base_streams.py L674-L675 - lookback applied to the slice start only: base_streams.py L872
- record filter receives the raw cached state: base_streams.py L929, L936
- comparison against that state: base_streams.py L286
Observed example (Airbyte Cloud, hourly incremental syncs, destination BigQuery)
An order paid through an asynchronous payment method has three transactions (two FAILURE, then one SALE/SUCCESS) with createdAt between 05:07 and 05:10 UTC. The order itself was created at 06:27 UTC, once the payment completed. The order is present in the destination (orders stream), but none of its transactions are. The Admin GraphQL API returns all three for that order.
Across all orders synced incrementally since April 2026, 61 have transactions in Shopify but none in the destination. Some other transactions with a similar gap between transaction and order creation were synced correctly, so this code path may not be the only factor. It is still reachable, and lookback_window_in_days cannot recover records dropped by it.
Related
#52561 reported the created_at cursor problem for transactions. It was closed on 2026-02-14 by an automated comment saying the issue was addressed in 3.2.1, but the cursor is still created_at on master.
Expected behavior
For BULK streams whose cursor_field differs from filter_field, a record should not be filtered out only because its child cursor is older than the saved state while its parent falls inside the requested window. At minimum, the lookback window should also apply to the record filter.
Relevant log output
No response
Contribute
- Yes, I want to contribute
Source: airbytehq/airbyte