maiven gateway · online··
manifest · 1d ago
Sign in
Back to catalog
MAIVENmodelmarts

mart_returns_daily

certified
mart table

Returns and refunded value per day, by category and reason.

Definition

The de-identified daily returns view. One row per (return_day, product_category, return_reason). `returns_count` is the number of return *requests*; `refunded_amount` sums money only for returns that reached `refunded` — the two diverge because requests can be pending or rejected. The customer linkage present in `stg_postgres__returns` is dropped here. To compute a return RATE, pair returns_count with order volume from `metric_revenue_by_month` (orders_count) or `mart_orders_daily`.

Watch out for
  • highTreating `returns_count` as refunds

    `returns_count` counts every return request, including `requested`, `approved`, and `rejected`. Only `refunded_amount` reflects money actually returned. Use refunded_amount for financial leakage, returns_count for operational volume.

  • highComputing a return rate from this mart alone

    This mart has no order/sales denominator. A return RATE needs order volume from `metric_revenue_by_month` (orders_count) or `mart_orders_daily` over the same window — dividing returns_count by anything inside this mart is wrong.

Questions this answers
  • “Which product categories have the most returns this quarter?”
  • “Where is refund money leaking — by category and reason?”
7 of 7
Column
Type
Description
Tests · PII
return_day
Date
Calendar date the return was requested. Sort + partition key.
1 test
product_category
String
Product category of the returned item; `unknown` when unmapped. Sort key.
1 test
return_reason
String
Reason bucket for the return. Sort key.
1 test
returns_count
UInt64
Number of return requests (all statuses) in this bucket.
1 test
units_returned
UInt64
Total units returned (sum of quantity) in this bucket.
1 test
refunded_amount
Decimal(14, 2)
Sum of refund_amount for `refunded` returns only. Decimal(14,2).
2 tests
distinct_orders
UInt64
Distinct orders represented in this bucket (uniqExact).
1 test