Copy
Ask AI
version: 2
models:
- name: fct_orders_placed
description: >
Placed order fact table for order-count analytics and funnel tie-ins. Grain: One row per sm_order_line_key. Date field: order_created_at_local_datetime. Critical filters: source_system for platform-specific order placement reporting; order_created_at_local_datetime for temporal analysis. Key joins: dim_orders via sm_order_key (many:1); dim_order_lines via sm_order_line_key (1:1).
columns:
- name: _synced_at
description: >
UTC timestamp when SourceMedium last synced the row. Freshness indicator only; not for time-series analysis.
- name: order_created_at_local_datetime
description: >
Order created timestamp converted to reporting timezone (from order_created_at UTC).
- 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_gross_sales
description: >
The number of items in an order multiplied by the price of those items.
- name: order_line_id
description: >
The ID of the order line.
- name: order_line_price
description: >
The price of the items purchased in an order.
- name: order_line_quantity
description: >
The number of items that were originally purchased in an order.
- name: product_variant_id
description: >
A unique identifier for the product variant generated by the source system.
- name: sm_customer_key
description: >
Stable SourceMedium customer key. Unique per customer. Key joins: `dim_customers` (1:1); `dim_orders`/`obt_orders` (1:many). Platform caveat: TikTok Shop coverage may be limited.
- 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_product_key
description: >
Stable SourceMedium join key for products to related tables.
- name: sm_product_variant_key
description: >
Stable SourceMedium join key for product variants 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.