maiven gateway · online··
manifest · 1d ago
Sign in Back to catalog
Definition
Ephemeral join — attaches order header (customer_id, status, order_at) and payment-method metadata (method_type, card_brand) to each payment row, plus lifecycle booleans (`is_final_capture`, `is_refund`, `is_failed_auth`, `is_void`, `is_failure`). Revenue eligibility = `is_final_capture` (capture row with status succeeded); naively summing `amount` double-counts auth+capture.
22 of 22
Column
Description
Tests · PII
payment_id
From `stg_postgres__payments.payment_id`. Primary key.
customer_country
Customer's country at the time of join (LEFT JOIN — Nullable).
customer_segment
Customer's segment at the time of join (LEFT JOIN — Nullable).
payment_method_id
From staging — Nullable for vendor-side failures.
method_type
Coalesced to `'unknown'` for payments without a method.
card_brand
Coalesced to `'none'` for non-card methods.
transaction_type
`auth` / `capture` / `refund` / `void`.
status
`succeeded` / `failed` / `pending`.
amount
Per-row transaction amount.
currency
ISO-4217 currency code.
failure_reason
Vendor diagnostic on failures. Nullable.
processed_at
DateTime64(6) when the vendor processed.
processed_day
toDate(processed_at). Partition key for marts.
order_at
From `stg_postgres__orders.order_at` (LEFT JOIN).
order_status
From `stg_postgres__orders.status` (LEFT JOIN).
is_final_capture
Derived — true when transaction_type='capture' AND status='succeeded'. Revenue eligibility.
is_refund
Derived — true when transaction_type='refund' AND status='succeeded'.
is_failed_auth
Derived — true when transaction_type='auth' AND status='failed'.
is_void
Derived — true when transaction_type='void' AND status='succeeded'.
is_failure
Derived — true when status='failed' (any transaction_type).