Copy
Ask AI
version: 2
models:
- name: dim_order_taxes
description: >
Order tax dimension with tax names and amounts for reconciliation and reporting. Grain: One row per sm_order_tax_key. No canonical date; _synced_at is a freshness timestamp (not for analysis). Critical filters: source_system for platform-specific tax reporting, tax_line_entity for line vs shipping taxes. Key joins: dim_order_lines via sm_order_line_key (many:1); dim_orders via sm_order_key (many:1).
columns:
- name: _synced_at
description: >
UTC timestamp when SourceMedium last synced the row. Freshness indicator only; not for time-series analysis.
- name: order_id
description: >
Platform order identifier. Not globally unique across stores; pair with `smcid` and `source_system` when needed for scoping.
- name: order_line_id
description: >
The ID of the order line.
- name: order_shipping_line_id
description: >
The ID of the shipping line.
- name: sm_order_key
description: >
Stable SourceMedium order key. Unique per order. Key joins: `obt_order_lines` (1:many via `sm_order_key`); `dim_customers` (many:1 via `sm_customer_key`). Platform caveat: TikTok Shop coverage may be limited.
- name: sm_order_line_key
description: >
Stable SourceMedium order line key. Unique per line. Key joins: `dim_order_lines` (1:1); `dim_orders` (many:1 via `sm_order_key`). Platform caveat: TikTok Shop coverage may be limited.
- name: sm_order_tax_key
description: >
The unique order tax key created by SourceMedium that can be used to join order tax dimensions to related tables.
- name: sm_store_id
description: >
SourceMedium's unique store identifier. For Shopify stores, derived from the myshopify.com domain; for other platforms (Amazon, TikTok Shop, Walmart.com), uses platform-specific identifiers.
- name: source_system
description: >
Originating platform for the record (e.g., Shopify, Amazon, TikTok Shop, Chargebee). Used for platform‑specific behavior and coverage.
- name: tax_line_entity
description: >
The line the tax applies to (e.g., shipping, order).
- name: tax_line_rate
description: >
The proportion of the order price that the tax represents.
- name: tax_line_type
description: >
The type of tax (e.g., state, county, excise and use, sales) applied to an order line.
- name: taxes
description: >
The amount of tax associated with a tax line entity, after discounts and before returns.

