Connecting Medusa to Snowflake
Medusa is a Node commerce engine you extend in your own codebase, which makes the conversion event a piece of application code — and therefore something that can be tested rather than hoped for. Snowflake's distinguishing feature is that two organisations can join data without either copying it to the other, which turns measurement between partners from a legal negotiation into a query. The join between them succeeds or fails on one thing: whether whatever join key both parties agree on, usually a hashed identifier reaches the Medusa order before the conversion happens, because Snowflake can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Medusa to Snowflake: replicate Postgres, not just events
Replicate Medusa's orders, payments, refunds and carts from Postgres into Snowflake with change data capture. In v2 some totals are calculated, not stored, so have a subscriber write captured amount and currency if needed. Land metadata click IDs in a VARIANT column, dedupe on order ID, and use Snowflake only for sharing or joins.
Medusa already writes every order to Postgres, so the cleanest Snowflake pipeline replicates tables rather than inventing events. A change-data-capture connector from Postgres keeps orders, payments, refunds and carts current, with the raw rows intact. Add a subscriber-written event table only for things that are not stored, such as the moment of payment capture if you want it timestamped independently.
The Medusa-specific catch: in v2 several order totals are calculated by the application rather than stored as one column, so a raw table copy may not contain the paid total you expect. Check which totals your version persists before building revenue models, and if necessary have a subscriber write the captured amount and currency to its own table. Click identifiers live in cart and order metadata as JSON; land them in a VARIANT column and flatten in Snowflake rather than parsing in the pipeline.
Snowflake is justified when you need to share or join with someone: a retailer, an agency, an ad platform's clean room, or ad spend from several accounts. If none of those apply, querying the Medusa database replica you already have answers the same questions. Either way, dedupe on order ID after every load, since connectors retry and the warehouse will not refuse a duplicate.
Medusa → Snowflake · what breaks
Why this join usually fails — Medusa → Snowflake
- 01
Whatever join key both parties agree on, usually a hashed identifier never reaches Medusa
The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created.
- 02
Firing on order placed rather than payment captured
They are different events and the gap between them contains every failed and pending payment. Order-placed is the easier hook and the wrong one.
- 03
A clean room that answers a question nobody agreed on
The technology makes the join possible; it does not make the definitions match. Two organisations measuring the same campaign will disagree about what a conversion is, which window applies and whose attribution model governs — and the query will return a confident number for whichever set of assumptions got written into the SQL.
- 04
Nothing reconciles afterwards
Snowflake will not tell you anything is wrong. Verify by querying against each party's own totals and checking for duplicate rows on the join key before trusting any aggregate.
Medusa → Snowflake · the fix
What working looks like — Medusa → Snowflake
Whatever join key both parties agree on, usually a hashed identifier on every order
Conversions arriving in Snowflake
The row lands in a table you own, joinable to your own data and — through a share or clean room — to a partner's, without either party moving raw records.
Reconciled against the source
Medusa → Snowflake · architecture
How Medusa and Snowflake actually connect
- 1
Medusa holds the truth
Because you own the event handlers, the conversion can fire from the payment-captured event specifically rather than from whatever the frontend happened to render.
- 2
Snowflake needs a click to match
A schema both sides agree on, consistent types, and identifiers normalised identically before hashing. The failure mode is not rejection but silent divergence — a timestamp in the wrong zone or a trimmed-versus-untrimmed email produces answers that look plausible.
- 3
The identifier is the bridge
Whatever join key both parties agree on, usually a hashed identifier, captured at the visit and carried into the Medusa order.
- 4
The event source decides reliability
Send orders at payment capture, at the paid total.
- 5
Deduplication at the destination
Nothing deduplicates for you. Loads are at-least-once, so a retried pipeline creates duplicate rows and the only protection is a deduplication step you write and actually schedule.
Medusa → Snowflake · normal or broken
Working vs. broken, side by side — Medusa → Snowflake
Normal, not a fault
Whatever join key both parties agree on, usually a hashed identifier present on the order
Sent from a Medusa subscriber on order payment capture
Deduplicated correctly
Nothing deduplicates for you. Loads are at-least-once, so a retried pipeline creates duplicate rows and the only protection is a deduplication step you write and actually schedule.
Reconciles with the source
Actually broken
Whatever join key both parties agree on, usually a hashed identifier missing on most records
The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created.
Sent from the browser
They are different events and the gap between them contains every failed and pending payment. Order-placed is the easier hook and the wrong one.
Counted twice, or not at all
The technology makes the join possible; it does not make the definitions match. Two organisations measuring the same campaign will disagree about what a conversion is, which window applies and whose attribution model governs — and the query will return a confident number for whichever set of assumptions got written into the SQL.
Nobody has reconciled it
Medusa → Snowflake · diagnose
Diagnostic order — Medusa → Snowflake
- 01
Count orders carrying whatever join key both parties agree on, usually a hashed identifier
- 02
Follow one real conversion end to end
- 03
Check which event your subscriber listens to
One line of code, and it decides whether you are counting orders or counting money.
- 04
Write down both parties' conversion definitions before writing any query
Definition mismatch, not technology, is what makes most partner measurement projects produce numbers neither side trusts.
- 05
Read the match rate, not the success message
Snowflake will not tell you anything is wrong. Verify by querying against each party's own totals and checking for duplicate rows on the join key before trusting any aggregate.
Medusa → Snowflake · prove
How it gets proven — Medusa → Snowflake
Source of truth
Medusa orders by payment status, emitted from your own subscriber code.
- Whatever join key both parties agree on, usually a hashed identifier confirmed present on a live order.
- Row counts and revenue reconciled against each source system for a closed window, with duplicates checked on the join key and both definitions documented.
- Payment-captured orders reconciled against imported conversions.
Medusa → Snowflake · free audit
What we check in the free audit
- Count orders carrying whatever join key both parties agree on, usually a hashed identifier
- Follow one real conversion end to end
- Check which event your subscriber listens to
- Write down both parties' conversion definitions before writing any query
- Read the match rate, not the success message
Checked against
Medusa orders by payment status, emitted from your own subscriber code.
Free30 minutesNo obligation
Medusa → Snowflake · when not to buy
When you don't need this — Medusa → Snowflake
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry whatever join key both parties agree on, usually a hashed identifier.
- If every payment method you accept is instant, the two events nearly coincide and the distinction costs more than it returns.
- If you have no partner to share data with and one cloud, a warehouse you already run does the same job. The sharing capability is what justifies this one.
Medusa → Snowflake · what we deliver
What gets built — Medusa → Snowflake
Identifier capture into Medusa
Write the identifier into cart metadata at first touch so it is carried onto the order automatically at completion.
Event source: a Medusa subscriber on order payment capture
Send orders at payment capture, at the paid total.
Dispatch to Snowflake
Batch or streaming loads from your order system, with the raw event retained alongside anything you derive from it.
Reversals where they exist
Refunds emit their own event and should reverse.
Written guarantee
95%+ tracking accuracy
Measured against Medusa orders by payment status, emitted from your own subscriber code.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Medusa → Snowflake questions, answered
Replicate Medusa's Postgres tables with a change-data-capture connector, then model orders and payments in Snowflake. Add an event table only for facts Medusa does not persist.
In Medusa v2 some totals are computed by the application at read time. Persist the captured amount yourself or rebuild the total from line items and adjustments.
Almost always because whatever join key both parties agree on, usually a hashed identifier never reached the Medusa order. The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created. Measure coverage before debugging the dispatch.
There is no vendor identifier. In a data share or clean room the key is negotiated: hashed email, order ID, a partner-supplied ID. Normalisation before hashing is the entire match rate, and a formatting difference between two organisations looks exactly like a poor-performing partnership.
A Medusa subscriber on order payment capture. Send orders at payment capture, at the paid total.
Snowflake will not tell you anything is wrong. Verify by querying against each party's own totals and checking for duplicate rows on the join key before trusting any aggregate.
More on Medusa → Snowflake
- Medusa → Google AdsConnecting Medusa to Google Ads
- Medusa → MetaConnecting Medusa to Meta Conversions API
- Medusa → GA4Connecting Medusa to GA4
RELATED GUIDES
Where Medusa → Snowflake fits in the rest of your tracking
- Squarespace → SnowflakeConnecting Squarespace Commerce to Snowflake
- WooCommerce → SnowflakeConnecting WooCommerce to Snowflake
- SureCart → SnowflakeConnecting SureCart to Snowflake
- Medusa → SegmentConnecting Medusa to Segment
- Medusa → BigQueryConnecting Medusa to BigQuery
- Jewelry ecommerceConversion tracking for jewelry ecommerce, measured in settled orders
- EDD → SnowflakeConnecting Easy Digital Downloads to Snowflake
- Shopify POS → SnowflakeConnecting Shopify POS to Snowflake
Free · 30 min
Get Medusa and Snowflake joined properly
Free30 minutesNo obligation
