{
 "$schema_note": "See model/index.html for the shape. Generated by tools/build_sample_model.py.",
 "model": {
  "name": "Sample order-to-cash & inventory model",
  "version": "1.0",
  "description": "Generic, invented model used by every exploration. Swap it for your own metadata."
 },
 "layers": [
  {
   "id": "source",
   "name": "Source",
   "order": 0,
   "platform": "Operational systems",
   "fabric": "ERP database, CRM API, files",
   "description": "Systems of record. Owned by someone else; read, never written."
  },
  {
   "id": "bronze",
   "name": "Bronze",
   "order": 1,
   "platform": "Lakehouse (Files / shortcuts / views)",
   "fabric": "Shortcuts, mirrored tables, pipeline copies",
   "description": "Raw, source-shaped, append-friendly. Adds only audit columns."
  },
  {
   "id": "silver",
   "name": "Silver",
   "order": 2,
   "platform": "Lakehouse Delta tables",
   "fabric": "Notebooks or Warehouse T-SQL",
   "description": "Cleaned, typed, de-duplicated, conformed business entities."
  },
  {
   "id": "gold",
   "name": "Gold",
   "order": 3,
   "platform": "Warehouse (star schema)",
   "fabric": "Warehouse tables loaded by stored procedures",
   "description": "Dimensional model at declared grain: facts, dimensions, surrogate keys."
  },
  {
   "id": "semantic",
   "name": "Semantic model",
   "order": 4,
   "platform": "Power BI semantic model",
   "fabric": "Direct Lake semantic model",
   "description": "Relationships, measures, hierarchies and friendly names on top of gold."
  },
  {
   "id": "report",
   "name": "Reports",
   "order": 5,
   "platform": "Power BI reports",
   "fabric": "Reports, Excel, notebooks via semantic link",
   "description": "Visuals that ask the semantic model questions."
  }
 ],
 "tables": [
  {
   "id": "source.erp.sales_order_header",
   "layer": "source",
   "schema": "erp",
   "name": "sales_order_header",
   "kind": "source",
   "columns": [
    {
     "name": "order_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "order_number",
     "type": "varchar(20)",
     "key": "BK"
    },
    {
     "name": "customer_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "salesperson_id",
     "type": "varchar(12)",
     "key": "FK"
    },
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "order_date",
     "type": "datetime"
    },
    {
     "name": "ship_date",
     "type": "datetime"
    },
    {
     "name": "status",
     "type": "char(1)",
     "description": "O/S/C/X codes"
    },
    {
     "name": "currency_code",
     "type": "char(3)"
    },
    {
     "name": "modified_at",
     "type": "datetime",
     "description": "change tracking watermark"
    }
   ],
   "system": "ERP (SQL Server)",
   "description": "Order headers."
  },
  {
   "id": "source.erp.sales_order_line",
   "layer": "source",
   "schema": "erp",
   "name": "sales_order_line",
   "kind": "source",
   "columns": [
    {
     "name": "order_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "line_number",
     "type": "smallint",
     "key": "PK"
    },
    {
     "name": "product_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "quantity",
     "type": "decimal(12,3)"
    },
    {
     "name": "unit_price",
     "type": "decimal(12,4)"
    },
    {
     "name": "discount_pct",
     "type": "decimal(5,4)"
    },
    {
     "name": "line_status",
     "type": "char(1)"
    },
    {
     "name": "modified_at",
     "type": "datetime"
    }
   ],
   "system": "ERP (SQL Server)",
   "description": "Order lines."
  },
  {
   "id": "source.erp.customer",
   "layer": "source",
   "schema": "erp",
   "name": "customer",
   "kind": "source",
   "columns": [
    {
     "name": "customer_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "customer_name",
     "type": "nvarchar(200)"
    },
    {
     "name": "segment_code",
     "type": "char(2)"
    },
    {
     "name": "region_code",
     "type": "char(3)"
    },
    {
     "name": "city",
     "type": "nvarchar(100)"
    },
    {
     "name": "state",
     "type": "char(2)"
    },
    {
     "name": "created_at",
     "type": "datetime"
    },
    {
     "name": "modified_at",
     "type": "datetime"
    }
   ],
   "system": "ERP (SQL Server)",
   "description": "Customer master."
  },
  {
   "id": "source.erp.product",
   "layer": "source",
   "schema": "erp",
   "name": "product",
   "kind": "source",
   "columns": [
    {
     "name": "product_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "sku",
     "type": "varchar(30)",
     "key": "BK"
    },
    {
     "name": "product_name",
     "type": "nvarchar(200)"
    },
    {
     "name": "category",
     "type": "nvarchar(60)"
    },
    {
     "name": "subcategory",
     "type": "nvarchar(60)"
    },
    {
     "name": "color",
     "type": "nvarchar(30)"
    },
    {
     "name": "list_price",
     "type": "decimal(12,4)"
    },
    {
     "name": "standard_cost",
     "type": "decimal(12,4)"
    },
    {
     "name": "modified_at",
     "type": "datetime"
    }
   ],
   "system": "ERP (SQL Server)",
   "description": "Product master."
  },
  {
   "id": "source.erp.warehouse",
   "layer": "source",
   "schema": "erp",
   "name": "warehouse",
   "kind": "source",
   "columns": [
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "warehouse_name",
     "type": "nvarchar(100)"
    },
    {
     "name": "city",
     "type": "nvarchar(100)"
    },
    {
     "name": "state",
     "type": "char(2)"
    }
   ],
   "system": "ERP (SQL Server)",
   "description": "Warehouse list."
  },
  {
   "id": "source.erp.inventory_txn",
   "layer": "source",
   "schema": "erp",
   "name": "inventory_txn",
   "kind": "source",
   "columns": [
    {
     "name": "txn_id",
     "type": "bigint",
     "key": "PK"
    },
    {
     "name": "product_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "txn_date",
     "type": "datetime"
    },
    {
     "name": "qty_change",
     "type": "decimal(12,3)"
    },
    {
     "name": "txn_type",
     "type": "varchar(10)",
     "description": "RECEIPT/SHIP/ADJ"
    }
   ],
   "system": "ERP (SQL Server)",
   "description": "Inventory movements."
  },
  {
   "id": "source.crm.salesperson",
   "layer": "source",
   "schema": "crm",
   "name": "salesperson",
   "kind": "source",
   "columns": [
    {
     "name": "rep_id",
     "type": "string",
     "key": "PK"
    },
    {
     "name": "full_name",
     "type": "string"
    },
    {
     "name": "team",
     "type": "string"
    },
    {
     "name": "region",
     "type": "string"
    },
    {
     "name": "hire_date",
     "type": "string",
     "description": "ISO date as text"
    }
   ],
   "system": "CRM (REST API, JSON)",
   "description": "Sales reps."
  },
  {
   "id": "source.files.budget",
   "layer": "source",
   "schema": "files",
   "name": "budget",
   "kind": "source",
   "columns": [
    {
     "name": "fiscal_month",
     "type": "string",
     "description": "YYYY-MM"
    },
    {
     "name": "category",
     "type": "string"
    },
    {
     "name": "region",
     "type": "string"
    },
    {
     "name": "budget_amount",
     "type": "string"
    }
   ],
   "system": "Finance (monthly CSV drop)",
   "description": "Budget by month, category, region."
  },
  {
   "id": "bronze.erp_sales_order_header",
   "layer": "bronze",
   "schema": "bronze",
   "name": "erp_sales_order_header",
   "kind": "raw",
   "columns": [
    {
     "name": "order_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "order_number",
     "type": "varchar(20)",
     "key": "BK"
    },
    {
     "name": "customer_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "salesperson_id",
     "type": "varchar(12)",
     "key": "FK"
    },
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "order_date",
     "type": "datetime"
    },
    {
     "name": "ship_date",
     "type": "datetime"
    },
    {
     "name": "status",
     "type": "char(1)"
    },
    {
     "name": "currency_code",
     "type": "char(3)"
    },
    {
     "name": "modified_at",
     "type": "datetime"
    },
    {
     "name": "_ingested_at",
     "type": "timestamp",
     "description": "audit"
    },
    {
     "name": "_batch_id",
     "type": "string",
     "description": "audit"
    }
   ],
   "ingest": "shortcut",
   "description": "Raw erp.sales_order_header as landed (shortcut). Source-shaped, nothing renamed."
  },
  {
   "id": "bronze.erp_sales_order_line",
   "layer": "bronze",
   "schema": "bronze",
   "name": "erp_sales_order_line",
   "kind": "raw",
   "columns": [
    {
     "name": "order_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "line_number",
     "type": "smallint",
     "key": "PK"
    },
    {
     "name": "product_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "quantity",
     "type": "decimal(12,3)"
    },
    {
     "name": "unit_price",
     "type": "decimal(12,4)"
    },
    {
     "name": "discount_pct",
     "type": "decimal(5,4)"
    },
    {
     "name": "line_status",
     "type": "char(1)"
    },
    {
     "name": "modified_at",
     "type": "datetime"
    },
    {
     "name": "_ingested_at",
     "type": "timestamp",
     "description": "audit"
    },
    {
     "name": "_batch_id",
     "type": "string",
     "description": "audit"
    }
   ],
   "ingest": "shortcut",
   "description": "Raw erp.sales_order_line as landed (shortcut). Source-shaped, nothing renamed."
  },
  {
   "id": "bronze.erp_customer",
   "layer": "bronze",
   "schema": "bronze",
   "name": "erp_customer",
   "kind": "raw",
   "columns": [
    {
     "name": "customer_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "customer_name",
     "type": "nvarchar(200)"
    },
    {
     "name": "segment_code",
     "type": "char(2)"
    },
    {
     "name": "region_code",
     "type": "char(3)"
    },
    {
     "name": "city",
     "type": "nvarchar(100)"
    },
    {
     "name": "state",
     "type": "char(2)"
    },
    {
     "name": "created_at",
     "type": "datetime"
    },
    {
     "name": "modified_at",
     "type": "datetime"
    },
    {
     "name": "_ingested_at",
     "type": "timestamp",
     "description": "audit"
    },
    {
     "name": "_batch_id",
     "type": "string",
     "description": "audit"
    }
   ],
   "ingest": "shortcut",
   "description": "Raw erp.customer as landed (shortcut). Source-shaped, nothing renamed."
  },
  {
   "id": "bronze.erp_product",
   "layer": "bronze",
   "schema": "bronze",
   "name": "erp_product",
   "kind": "raw",
   "columns": [
    {
     "name": "product_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "sku",
     "type": "varchar(30)",
     "key": "BK"
    },
    {
     "name": "product_name",
     "type": "nvarchar(200)"
    },
    {
     "name": "category",
     "type": "nvarchar(60)"
    },
    {
     "name": "subcategory",
     "type": "nvarchar(60)"
    },
    {
     "name": "color",
     "type": "nvarchar(30)"
    },
    {
     "name": "list_price",
     "type": "decimal(12,4)"
    },
    {
     "name": "standard_cost",
     "type": "decimal(12,4)"
    },
    {
     "name": "modified_at",
     "type": "datetime"
    },
    {
     "name": "_ingested_at",
     "type": "timestamp",
     "description": "audit"
    },
    {
     "name": "_batch_id",
     "type": "string",
     "description": "audit"
    }
   ],
   "ingest": "shortcut",
   "description": "Raw erp.product as landed (shortcut). Source-shaped, nothing renamed."
  },
  {
   "id": "bronze.erp_warehouse",
   "layer": "bronze",
   "schema": "bronze",
   "name": "erp_warehouse",
   "kind": "raw",
   "columns": [
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "warehouse_name",
     "type": "nvarchar(100)"
    },
    {
     "name": "city",
     "type": "nvarchar(100)"
    },
    {
     "name": "state",
     "type": "char(2)"
    },
    {
     "name": "_ingested_at",
     "type": "timestamp",
     "description": "audit"
    },
    {
     "name": "_batch_id",
     "type": "string",
     "description": "audit"
    }
   ],
   "ingest": "shortcut",
   "description": "Raw erp.warehouse as landed (shortcut). Source-shaped, nothing renamed."
  },
  {
   "id": "bronze.erp_inventory_txn",
   "layer": "bronze",
   "schema": "bronze",
   "name": "erp_inventory_txn",
   "kind": "raw",
   "columns": [
    {
     "name": "txn_id",
     "type": "bigint",
     "key": "PK"
    },
    {
     "name": "product_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "txn_date",
     "type": "datetime"
    },
    {
     "name": "qty_change",
     "type": "decimal(12,3)"
    },
    {
     "name": "txn_type",
     "type": "varchar(10)"
    },
    {
     "name": "_ingested_at",
     "type": "timestamp",
     "description": "audit"
    },
    {
     "name": "_batch_id",
     "type": "string",
     "description": "audit"
    }
   ],
   "ingest": "copy (incremental)",
   "description": "Raw erp.inventory_txn as landed (copy (incremental)). Source-shaped, nothing renamed."
  },
  {
   "id": "bronze.crm_salesperson",
   "layer": "bronze",
   "schema": "bronze",
   "name": "crm_salesperson",
   "kind": "raw",
   "columns": [
    {
     "name": "rep_id",
     "type": "string",
     "key": "PK"
    },
    {
     "name": "full_name",
     "type": "string"
    },
    {
     "name": "team",
     "type": "string"
    },
    {
     "name": "region",
     "type": "string"
    },
    {
     "name": "hire_date",
     "type": "string"
    },
    {
     "name": "_ingested_at",
     "type": "timestamp",
     "description": "audit"
    },
    {
     "name": "_batch_id",
     "type": "string",
     "description": "audit"
    }
   ],
   "ingest": "copy (API)",
   "description": "Raw crm.salesperson as landed (copy (API)). Source-shaped, nothing renamed."
  },
  {
   "id": "bronze.files_budget",
   "layer": "bronze",
   "schema": "bronze",
   "name": "files_budget",
   "kind": "raw",
   "columns": [
    {
     "name": "fiscal_month",
     "type": "string"
    },
    {
     "name": "category",
     "type": "string"
    },
    {
     "name": "region",
     "type": "string"
    },
    {
     "name": "budget_amount",
     "type": "string"
    },
    {
     "name": "_ingested_at",
     "type": "timestamp",
     "description": "audit"
    },
    {
     "name": "_batch_id",
     "type": "string",
     "description": "audit"
    }
   ],
   "ingest": "copy (file)",
   "description": "Raw files.budget as landed (copy (file)). Source-shaped, nothing renamed."
  },
  {
   "id": "silver.sales_order_line",
   "layer": "silver",
   "schema": "silver",
   "name": "sales_order_line",
   "kind": "entity",
   "columns": [
    {
     "name": "order_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "line_number",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "order_number",
     "type": "string",
     "key": "BK"
    },
    {
     "name": "customer_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "salesperson_id",
     "type": "string",
     "key": "FK"
    },
    {
     "name": "product_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "order_date",
     "type": "date"
    },
    {
     "name": "ship_date",
     "type": "date"
    },
    {
     "name": "order_status",
     "type": "string"
    },
    {
     "name": "currency_code",
     "type": "string"
    },
    {
     "name": "quantity",
     "type": "decimal(12,3)"
    },
    {
     "name": "unit_price",
     "type": "decimal(12,4)"
    },
    {
     "name": "discount_pct",
     "type": "decimal(5,4)"
    },
    {
     "name": "gross_amount",
     "type": "decimal(18,4)"
    },
    {
     "name": "net_amount",
     "type": "decimal(18,4)"
    },
    {
     "name": "_modified_at",
     "type": "timestamp"
    }
   ],
   "grain": "One row per order line",
   "description": "Header joined to lines, typed, status decoded, amounts derived."
  },
  {
   "id": "silver.customer",
   "layer": "silver",
   "schema": "silver",
   "name": "customer",
   "kind": "entity",
   "columns": [
    {
     "name": "customer_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "customer_name",
     "type": "string"
    },
    {
     "name": "segment",
     "type": "string"
    },
    {
     "name": "region",
     "type": "string"
    },
    {
     "name": "city",
     "type": "string"
    },
    {
     "name": "state",
     "type": "string"
    },
    {
     "name": "created_date",
     "type": "date"
    },
    {
     "name": "_modified_at",
     "type": "timestamp"
    },
    {
     "name": "_row_hash",
     "type": "string",
     "description": "hash of tracked attributes for SCD2 change detection"
    }
   ],
   "grain": "One row per customer (current state)",
   "description": "Trimmed, de-duplicated, codes decoded."
  },
  {
   "id": "silver.product",
   "layer": "silver",
   "schema": "silver",
   "name": "product",
   "kind": "entity",
   "columns": [
    {
     "name": "product_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "sku",
     "type": "string",
     "key": "BK"
    },
    {
     "name": "product_name",
     "type": "string"
    },
    {
     "name": "category",
     "type": "string"
    },
    {
     "name": "subcategory",
     "type": "string"
    },
    {
     "name": "color",
     "type": "string"
    },
    {
     "name": "list_price",
     "type": "decimal(12,4)"
    },
    {
     "name": "standard_cost",
     "type": "decimal(12,4)"
    },
    {
     "name": "_modified_at",
     "type": "timestamp"
    }
   ],
   "grain": "One row per product",
   "description": "Typed product master; blank colors set to 'n/a'."
  },
  {
   "id": "silver.warehouse",
   "layer": "silver",
   "schema": "silver",
   "name": "warehouse",
   "kind": "entity",
   "columns": [
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "PK"
    },
    {
     "name": "warehouse_name",
     "type": "string"
    },
    {
     "name": "city",
     "type": "string"
    },
    {
     "name": "state",
     "type": "string"
    }
   ],
   "grain": "One row per warehouse",
   "description": "Warehouse list."
  },
  {
   "id": "silver.inventory_txn",
   "layer": "silver",
   "schema": "silver",
   "name": "inventory_txn",
   "kind": "entity",
   "columns": [
    {
     "name": "txn_id",
     "type": "bigint",
     "key": "PK"
    },
    {
     "name": "product_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "txn_date",
     "type": "date"
    },
    {
     "name": "qty_in",
     "type": "decimal(12,3)"
    },
    {
     "name": "qty_out",
     "type": "decimal(12,3)"
    },
    {
     "name": "txn_type",
     "type": "string"
    }
   ],
   "grain": "One row per inventory movement",
   "description": "Signed quantity split into in/out."
  },
  {
   "id": "silver.salesperson",
   "layer": "silver",
   "schema": "silver",
   "name": "salesperson",
   "kind": "entity",
   "columns": [
    {
     "name": "salesperson_id",
     "type": "string",
     "key": "PK"
    },
    {
     "name": "salesperson_name",
     "type": "string"
    },
    {
     "name": "team",
     "type": "string"
    },
    {
     "name": "region",
     "type": "string"
    },
    {
     "name": "hire_date",
     "type": "date"
    }
   ],
   "grain": "One row per sales rep",
   "description": "Flattened from JSON, renamed to the enterprise vocabulary."
  },
  {
   "id": "silver.budget",
   "layer": "silver",
   "schema": "silver",
   "name": "budget",
   "kind": "entity",
   "columns": [
    {
     "name": "month_start",
     "type": "date",
     "key": "PK"
    },
    {
     "name": "category",
     "type": "string",
     "key": "PK"
    },
    {
     "name": "region",
     "type": "string",
     "key": "PK"
    },
    {
     "name": "budget_amount",
     "type": "decimal(18,2)"
    }
   ],
   "grain": "One row per month x category x region",
   "description": "CSV typed and validated; months as first-of-month dates."
  },
  {
   "id": "gold.dim_date",
   "layer": "gold",
   "schema": "dbo",
   "name": "dim_date",
   "kind": "dimension",
   "columns": [
    {
     "name": "date_key",
     "type": "int",
     "key": "SK",
     "description": "yyyymmdd"
    },
    {
     "name": "calendar_date",
     "type": "date",
     "key": "BK"
    },
    {
     "name": "month_start",
     "type": "date"
    },
    {
     "name": "month_name",
     "type": "varchar"
    },
    {
     "name": "quarter",
     "type": "varchar"
    },
    {
     "name": "fiscal_year",
     "type": "int"
    },
    {
     "name": "is_weekend",
     "type": "bit"
    }
   ],
   "grain": "One row per calendar day",
   "scd": "Type 0 (generated)",
   "generated": true,
   "description": "Generated calendar. Role-plays as order date, ship date, snapshot date and budget month."
  },
  {
   "id": "gold.dim_customer",
   "layer": "gold",
   "schema": "dbo",
   "name": "dim_customer",
   "kind": "dimension",
   "columns": [
    {
     "name": "customer_key",
     "type": "int",
     "key": "SK"
    },
    {
     "name": "customer_id",
     "type": "int",
     "key": "BK"
    },
    {
     "name": "customer_name",
     "type": "varchar"
    },
    {
     "name": "segment",
     "type": "varchar"
    },
    {
     "name": "region",
     "type": "varchar"
    },
    {
     "name": "city",
     "type": "varchar"
    },
    {
     "name": "state",
     "type": "varchar"
    },
    {
     "name": "valid_from",
     "type": "datetime2"
    },
    {
     "name": "valid_to",
     "type": "datetime2"
    },
    {
     "name": "is_current",
     "type": "bit"
    }
   ],
   "grain": "One row per customer version",
   "scd": "Type 2 on segment, region, city, state; Type 1 on name",
   "description": "History-tracked customer. Facts point at the version current when the order was placed."
  },
  {
   "id": "gold.dim_product",
   "layer": "gold",
   "schema": "dbo",
   "name": "dim_product",
   "kind": "dimension",
   "columns": [
    {
     "name": "product_key",
     "type": "int",
     "key": "SK"
    },
    {
     "name": "product_id",
     "type": "int",
     "key": "BK"
    },
    {
     "name": "sku",
     "type": "varchar"
    },
    {
     "name": "product_name",
     "type": "varchar"
    },
    {
     "name": "category",
     "type": "varchar"
    },
    {
     "name": "subcategory",
     "type": "varchar"
    },
    {
     "name": "color",
     "type": "varchar"
    },
    {
     "name": "list_price",
     "type": "decimal(12,4)"
    }
   ],
   "grain": "One row per product",
   "scd": "Type 1",
   "description": "Overwritten in place; current attributes only."
  },
  {
   "id": "gold.dim_warehouse",
   "layer": "gold",
   "schema": "dbo",
   "name": "dim_warehouse",
   "kind": "dimension",
   "columns": [
    {
     "name": "warehouse_key",
     "type": "int",
     "key": "SK"
    },
    {
     "name": "warehouse_id",
     "type": "int",
     "key": "BK"
    },
    {
     "name": "warehouse_name",
     "type": "varchar"
    },
    {
     "name": "city",
     "type": "varchar"
    },
    {
     "name": "state",
     "type": "varchar"
    }
   ],
   "grain": "One row per warehouse",
   "scd": "Type 1",
   "description": "Warehouses."
  },
  {
   "id": "gold.dim_salesperson",
   "layer": "gold",
   "schema": "dbo",
   "name": "dim_salesperson",
   "kind": "dimension",
   "columns": [
    {
     "name": "salesperson_key",
     "type": "int",
     "key": "SK"
    },
    {
     "name": "salesperson_id",
     "type": "varchar",
     "key": "BK"
    },
    {
     "name": "salesperson_name",
     "type": "varchar"
    },
    {
     "name": "team",
     "type": "varchar"
    },
    {
     "name": "region",
     "type": "varchar"
    }
   ],
   "grain": "One row per sales rep",
   "scd": "Type 1",
   "description": "Sales reps from CRM, conformed to the ERP rep id."
  },
  {
   "id": "gold.fact_sales",
   "layer": "gold",
   "schema": "dbo",
   "name": "fact_sales",
   "kind": "fact",
   "columns": [
    {
     "name": "order_date_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "ship_date_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "customer_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "product_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "warehouse_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "salesperson_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "order_number",
     "type": "varchar",
     "key": "DD",
     "description": "degenerate dimension"
    },
    {
     "name": "line_number",
     "type": "int",
     "key": "DD"
    },
    {
     "name": "quantity",
     "type": "decimal(12,3)"
    },
    {
     "name": "gross_amount",
     "type": "decimal(18,4)"
    },
    {
     "name": "discount_amount",
     "type": "decimal(18,4)"
    },
    {
     "name": "net_amount",
     "type": "decimal(18,4)"
    },
    {
     "name": "cost_amount",
     "type": "decimal(18,4)"
    }
   ],
   "grain": "One row per sales order line",
   "fact_type": "Transaction",
   "additivity": "All measures fully additive",
   "description": "Order lines with surrogate keys looked up at load time."
  },
  {
   "id": "gold.fact_inventory_daily",
   "layer": "gold",
   "schema": "dbo",
   "name": "fact_inventory_daily",
   "kind": "fact",
   "columns": [
    {
     "name": "snapshot_date_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "product_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "warehouse_key",
     "type": "int",
     "key": "FK"
    },
    {
     "name": "qty_in",
     "type": "decimal(12,3)"
    },
    {
     "name": "qty_out",
     "type": "decimal(12,3)"
    },
    {
     "name": "on_hand_qty",
     "type": "decimal(12,3)",
     "description": "semi-additive: not across time"
    }
   ],
   "grain": "One row per product x warehouse x day",
   "fact_type": "Periodic snapshot",
   "additivity": "qty_in/qty_out additive; on_hand_qty semi-additive (not over time)",
   "description": "Daily position built from movements: running sum of in minus out."
  },
  {
   "id": "gold.fact_budget",
   "layer": "gold",
   "schema": "dbo",
   "name": "fact_budget",
   "kind": "fact",
   "columns": [
    {
     "name": "month_date_key",
     "type": "int",
     "key": "FK",
     "description": "first day of month"
    },
    {
     "name": "category",
     "type": "varchar",
     "description": "joins dim_product at category grain"
    },
    {
     "name": "region",
     "type": "varchar",
     "description": "joins customer region"
    },
    {
     "name": "budget_amount",
     "type": "decimal(18,2)"
    }
   ],
   "grain": "One row per month x product category x region",
   "fact_type": "Periodic snapshot (plan)",
   "additivity": "Additive",
   "description": "Plan at a coarser grain than sales: a shrunken view of Date and Product."
  },
  {
   "id": "semantic.Date",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Date",
   "kind": "semantic-table",
   "columns": [
    {
     "name": "Date",
     "type": "date"
    },
    {
     "name": "Month",
     "type": "date"
    },
    {
     "name": "Month Name",
     "type": "varchar"
    },
    {
     "name": "Quarter",
     "type": "varchar"
    },
    {
     "name": "Fiscal Year",
     "type": "int"
    },
    {
     "name": "date_key",
     "type": "int",
     "key": "SK",
     "hidden": true
    }
   ],
   "source_table": "gold.dim_date",
   "storage": "Direct Lake",
   "description": "Direct Lake table over dim_date."
  },
  {
   "id": "semantic.Customer",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Customer",
   "kind": "semantic-table",
   "columns": [
    {
     "name": "Customer",
     "type": "varchar"
    },
    {
     "name": "Segment",
     "type": "varchar"
    },
    {
     "name": "Region",
     "type": "varchar"
    },
    {
     "name": "City",
     "type": "varchar"
    },
    {
     "name": "State",
     "type": "varchar"
    },
    {
     "name": "customer_key",
     "type": "int",
     "key": "SK",
     "hidden": true
    }
   ],
   "source_table": "gold.dim_customer",
   "storage": "Direct Lake",
   "description": "Direct Lake table over dim_customer."
  },
  {
   "id": "semantic.Product",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Product",
   "kind": "semantic-table",
   "columns": [
    {
     "name": "Product",
     "type": "varchar"
    },
    {
     "name": "SKU",
     "type": "varchar"
    },
    {
     "name": "Category",
     "type": "varchar"
    },
    {
     "name": "Subcategory",
     "type": "varchar"
    },
    {
     "name": "Color",
     "type": "varchar"
    },
    {
     "name": "product_key",
     "type": "int",
     "key": "SK",
     "hidden": true
    }
   ],
   "source_table": "gold.dim_product",
   "storage": "Direct Lake",
   "description": "Direct Lake table over dim_product."
  },
  {
   "id": "semantic.Warehouse",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Warehouse",
   "kind": "semantic-table",
   "columns": [
    {
     "name": "Warehouse",
     "type": "varchar"
    },
    {
     "name": "Warehouse State",
     "type": "varchar"
    },
    {
     "name": "warehouse_key",
     "type": "int",
     "key": "SK",
     "hidden": true
    }
   ],
   "source_table": "gold.dim_warehouse",
   "storage": "Direct Lake",
   "description": "Direct Lake table over dim_warehouse."
  },
  {
   "id": "semantic.Salesperson",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Salesperson",
   "kind": "semantic-table",
   "columns": [
    {
     "name": "Salesperson",
     "type": "varchar"
    },
    {
     "name": "Team",
     "type": "varchar"
    },
    {
     "name": "salesperson_key",
     "type": "int",
     "key": "SK",
     "hidden": true
    }
   ],
   "source_table": "gold.dim_salesperson",
   "storage": "Direct Lake",
   "description": "Direct Lake table over dim_salesperson."
  },
  {
   "id": "semantic.Sales",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Sales",
   "kind": "semantic-table",
   "columns": [
    {
     "name": "Order Number",
     "type": "varchar"
    },
    {
     "name": "order_date_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "ship_date_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "customer_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "product_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "warehouse_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "salesperson_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "quantity",
     "type": "decimal(12,3)",
     "hidden": true
    },
    {
     "name": "gross_amount",
     "type": "decimal(18,4)",
     "hidden": true
    },
    {
     "name": "discount_amount",
     "type": "decimal(18,4)",
     "hidden": true
    },
    {
     "name": "net_amount",
     "type": "decimal(18,4)",
     "hidden": true
    },
    {
     "name": "cost_amount",
     "type": "decimal(18,4)",
     "hidden": true
    }
   ],
   "source_table": "gold.fact_sales",
   "storage": "Direct Lake",
   "description": "Direct Lake table over fact_sales."
  },
  {
   "id": "semantic.Inventory",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Inventory",
   "kind": "semantic-table",
   "columns": [
    {
     "name": "snapshot_date_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "product_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "warehouse_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "on_hand_qty",
     "type": "decimal(12,3)",
     "hidden": true
    }
   ],
   "source_table": "gold.fact_inventory_daily",
   "storage": "Direct Lake",
   "description": "Direct Lake table over fact_inventory_daily."
  },
  {
   "id": "semantic.Budget",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Budget",
   "kind": "semantic-table",
   "columns": [
    {
     "name": "month_date_key",
     "type": "int",
     "key": "FK",
     "hidden": true
    },
    {
     "name": "Category",
     "type": "varchar"
    },
    {
     "name": "Region",
     "type": "varchar"
    },
    {
     "name": "budget_amount",
     "type": "decimal(18,2)",
     "hidden": true
    }
   ],
   "source_table": "gold.fact_budget",
   "storage": "Direct Lake",
   "description": "Direct Lake table over fact_budget."
  },
  {
   "id": "semantic.Measures",
   "layer": "semantic",
   "schema": "Sales & Inventory",
   "name": "Measures",
   "kind": "measure-table",
   "columns": [
    {
     "name": "Net Sales",
     "type": "measure",
     "expression": "SUM ( Sales[net_amount] )",
     "folder": "Currency",
     "isMeasure": true
    },
    {
     "name": "Gross Sales",
     "type": "measure",
     "expression": "SUM ( Sales[gross_amount] )",
     "folder": "Currency",
     "isMeasure": true
    },
    {
     "name": "Discount",
     "type": "measure",
     "expression": "SUM ( Sales[discount_amount] )",
     "folder": "Currency",
     "isMeasure": true
    },
    {
     "name": "Units",
     "type": "measure",
     "expression": "SUM ( Sales[quantity] )",
     "folder": "Volume",
     "isMeasure": true
    },
    {
     "name": "Cost",
     "type": "measure",
     "expression": "SUM ( Sales[cost_amount] )",
     "folder": "Currency",
     "isMeasure": true
    },
    {
     "name": "Gross Margin",
     "type": "measure",
     "expression": "[Net Sales] - [Cost]",
     "folder": "Currency",
     "isMeasure": true
    },
    {
     "name": "Margin %",
     "type": "measure",
     "expression": "DIVIDE ( [Gross Margin], [Net Sales] )",
     "folder": "Ratio",
     "isMeasure": true
    },
    {
     "name": "Net Sales PY",
     "type": "measure",
     "expression": "CALCULATE ( [Net Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )",
     "folder": "Time intelligence",
     "isMeasure": true
    },
    {
     "name": "YoY %",
     "type": "measure",
     "expression": "DIVIDE ( [Net Sales] - [Net Sales PY], [Net Sales PY] )",
     "folder": "Time intelligence",
     "isMeasure": true
    },
    {
     "name": "Sales by Ship Date",
     "type": "measure",
     "expression": "CALCULATE ( [Net Sales], USERELATIONSHIP ( Sales[ship_date_key], 'Date'[date_key] ) )",
     "folder": "Role-playing",
     "isMeasure": true
    },
    {
     "name": "On Hand Units",
     "type": "measure",
     "expression": "CALCULATE ( SUM ( Inventory[on_hand_qty] ), LASTNONBLANK ( 'Date'[Date], CALCULATE ( SUM ( Inventory[on_hand_qty] ) ) ) )",
     "folder": "Semi-additive",
     "isMeasure": true
    },
    {
     "name": "Budget",
     "type": "measure",
     "expression": "SUM ( Budget[budget_amount] )",
     "folder": "Plan",
     "isMeasure": true
    },
    {
     "name": "Budget Variance",
     "type": "measure",
     "expression": "[Net Sales] - [Budget]",
     "folder": "Plan",
     "isMeasure": true
    }
   ],
   "storage": "Measures only",
   "description": "Display-only table that holds every measure, grouped by display folder."
  },
  {
   "id": "report.Sales Overview",
   "layer": "report",
   "schema": "Sales Overview",
   "name": "Sales Overview",
   "kind": "report",
   "columns": [
    {
     "name": "KPI cards",
     "type": "visual",
     "description": "Net Sales, Margin %, YoY %"
    },
    {
     "name": "Monthly trend",
     "type": "visual",
     "description": "Net Sales, Net Sales PY, Month"
    },
    {
     "name": "Sales by category",
     "type": "visual",
     "description": "Net Sales, Gross Margin, Category"
    },
    {
     "name": "Budget vs actual",
     "type": "visual",
     "description": "Net Sales, Budget, Budget Variance, Category, Month"
    },
    {
     "name": "Shipped vs ordered",
     "type": "visual",
     "description": "Net Sales, Sales by Ship Date, Month"
    },
    {
     "name": "Top customers",
     "type": "visual",
     "description": "Net Sales, Units, Customer, Segment"
    }
   ],
   "description": "Report: Sales Overview."
  },
  {
   "id": "report.Inventory Health",
   "layer": "report",
   "schema": "Inventory Health",
   "name": "Inventory Health",
   "kind": "report",
   "columns": [
    {
     "name": "On hand by warehouse",
     "type": "visual",
     "description": "On Hand Units, Warehouse"
    },
    {
     "name": "On hand vs units sold",
     "type": "visual",
     "description": "On Hand Units, Units, Category, Month"
    }
   ],
   "description": "Report: Inventory Health."
  }
 ],
 "columnLineage": [
  {
   "from": "source.erp.sales_order_header.order_id",
   "to": "bronze.erp_sales_order_header.order_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.order_number",
   "to": "bronze.erp_sales_order_header.order_number",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.customer_id",
   "to": "bronze.erp_sales_order_header.customer_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.salesperson_id",
   "to": "bronze.erp_sales_order_header.salesperson_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.warehouse_id",
   "to": "bronze.erp_sales_order_header.warehouse_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.order_date",
   "to": "bronze.erp_sales_order_header.order_date",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.ship_date",
   "to": "bronze.erp_sales_order_header.ship_date",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.status",
   "to": "bronze.erp_sales_order_header.status",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.currency_code",
   "to": "bronze.erp_sales_order_header.currency_code",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_header.modified_at",
   "to": "bronze.erp_sales_order_header.modified_at",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_line.order_id",
   "to": "bronze.erp_sales_order_line.order_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_line.line_number",
   "to": "bronze.erp_sales_order_line.line_number",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_line.product_id",
   "to": "bronze.erp_sales_order_line.product_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_line.quantity",
   "to": "bronze.erp_sales_order_line.quantity",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_line.unit_price",
   "to": "bronze.erp_sales_order_line.unit_price",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_line.discount_pct",
   "to": "bronze.erp_sales_order_line.discount_pct",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_line.line_status",
   "to": "bronze.erp_sales_order_line.line_status",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.sales_order_line.modified_at",
   "to": "bronze.erp_sales_order_line.modified_at",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.customer.customer_id",
   "to": "bronze.erp_customer.customer_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.customer.customer_name",
   "to": "bronze.erp_customer.customer_name",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.customer.segment_code",
   "to": "bronze.erp_customer.segment_code",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.customer.region_code",
   "to": "bronze.erp_customer.region_code",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.customer.city",
   "to": "bronze.erp_customer.city",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.customer.state",
   "to": "bronze.erp_customer.state",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.customer.created_at",
   "to": "bronze.erp_customer.created_at",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.customer.modified_at",
   "to": "bronze.erp_customer.modified_at",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.product_id",
   "to": "bronze.erp_product.product_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.sku",
   "to": "bronze.erp_product.sku",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.product_name",
   "to": "bronze.erp_product.product_name",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.category",
   "to": "bronze.erp_product.category",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.subcategory",
   "to": "bronze.erp_product.subcategory",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.color",
   "to": "bronze.erp_product.color",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.list_price",
   "to": "bronze.erp_product.list_price",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.standard_cost",
   "to": "bronze.erp_product.standard_cost",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.product.modified_at",
   "to": "bronze.erp_product.modified_at",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.warehouse.warehouse_id",
   "to": "bronze.erp_warehouse.warehouse_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.warehouse.warehouse_name",
   "to": "bronze.erp_warehouse.warehouse_name",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.warehouse.city",
   "to": "bronze.erp_warehouse.city",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.warehouse.state",
   "to": "bronze.erp_warehouse.state",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.inventory_txn.txn_id",
   "to": "bronze.erp_inventory_txn.txn_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.inventory_txn.product_id",
   "to": "bronze.erp_inventory_txn.product_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.inventory_txn.warehouse_id",
   "to": "bronze.erp_inventory_txn.warehouse_id",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.inventory_txn.txn_date",
   "to": "bronze.erp_inventory_txn.txn_date",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.inventory_txn.qty_change",
   "to": "bronze.erp_inventory_txn.qty_change",
   "transform": "pass-through"
  },
  {
   "from": "source.erp.inventory_txn.txn_type",
   "to": "bronze.erp_inventory_txn.txn_type",
   "transform": "pass-through"
  },
  {
   "from": "source.crm.salesperson.rep_id",
   "to": "bronze.crm_salesperson.rep_id",
   "transform": "pass-through"
  },
  {
   "from": "source.crm.salesperson.full_name",
   "to": "bronze.crm_salesperson.full_name",
   "transform": "pass-through"
  },
  {
   "from": "source.crm.salesperson.team",
   "to": "bronze.crm_salesperson.team",
   "transform": "pass-through"
  },
  {
   "from": "source.crm.salesperson.region",
   "to": "bronze.crm_salesperson.region",
   "transform": "pass-through"
  },
  {
   "from": "source.crm.salesperson.hire_date",
   "to": "bronze.crm_salesperson.hire_date",
   "transform": "pass-through"
  },
  {
   "from": "source.files.budget.fiscal_month",
   "to": "bronze.files_budget.fiscal_month",
   "transform": "pass-through"
  },
  {
   "from": "source.files.budget.category",
   "to": "bronze.files_budget.category",
   "transform": "pass-through"
  },
  {
   "from": "source.files.budget.region",
   "to": "bronze.files_budget.region",
   "transform": "pass-through"
  },
  {
   "from": "source.files.budget.budget_amount",
   "to": "bronze.files_budget.budget_amount",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_header.order_id",
   "to": "silver.sales_order_line.order_id",
   "transform": "join key"
  },
  {
   "from": "bronze.erp_sales_order_line.order_id",
   "to": "silver.sales_order_line.order_id",
   "transform": "join key"
  },
  {
   "from": "bronze.erp_sales_order_line.line_number",
   "to": "silver.sales_order_line.line_number",
   "transform": "cast"
  },
  {
   "from": "bronze.erp_sales_order_header.order_number",
   "to": "silver.sales_order_line.order_number",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_header.customer_id",
   "to": "silver.sales_order_line.customer_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_header.salesperson_id",
   "to": "silver.sales_order_line.salesperson_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_header.warehouse_id",
   "to": "silver.sales_order_line.warehouse_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_header.currency_code",
   "to": "silver.sales_order_line.currency_code",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_header.order_date",
   "to": "silver.sales_order_line.order_date",
   "transform": "cast to date"
  },
  {
   "from": "bronze.erp_sales_order_header.ship_date",
   "to": "silver.sales_order_line.ship_date",
   "transform": "cast to date"
  },
  {
   "from": "bronze.erp_sales_order_header.status",
   "to": "silver.sales_order_line.order_status",
   "transform": "decode O/S/C/X"
  },
  {
   "from": "bronze.erp_sales_order_line.product_id",
   "to": "silver.sales_order_line.product_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_line.quantity",
   "to": "silver.sales_order_line.quantity",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_line.unit_price",
   "to": "silver.sales_order_line.unit_price",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_line.discount_pct",
   "to": "silver.sales_order_line.discount_pct",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_sales_order_line.quantity",
   "to": "silver.sales_order_line.gross_amount",
   "transform": "quantity * unit_price"
  },
  {
   "from": "bronze.erp_sales_order_line.unit_price",
   "to": "silver.sales_order_line.gross_amount",
   "transform": "quantity * unit_price"
  },
  {
   "from": "bronze.erp_sales_order_line.quantity",
   "to": "silver.sales_order_line.net_amount",
   "transform": "qty * price * (1 - discount)"
  },
  {
   "from": "bronze.erp_sales_order_line.unit_price",
   "to": "silver.sales_order_line.net_amount",
   "transform": "qty * price * (1 - discount)"
  },
  {
   "from": "bronze.erp_sales_order_line.discount_pct",
   "to": "silver.sales_order_line.net_amount",
   "transform": "qty * price * (1 - discount)"
  },
  {
   "from": "bronze.erp_sales_order_header.modified_at",
   "to": "silver.sales_order_line._modified_at",
   "transform": "greatest(header, line)"
  },
  {
   "from": "bronze.erp_sales_order_line.modified_at",
   "to": "silver.sales_order_line._modified_at",
   "transform": "greatest(header, line)"
  },
  {
   "from": "bronze.erp_customer.customer_id",
   "to": "silver.customer.customer_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_customer.customer_name",
   "to": "silver.customer.customer_name",
   "transform": "trim, proper case"
  },
  {
   "from": "bronze.erp_customer.segment_code",
   "to": "silver.customer.segment",
   "transform": "lookup segment code"
  },
  {
   "from": "bronze.erp_customer.region_code",
   "to": "silver.customer.region",
   "transform": "lookup region code"
  },
  {
   "from": "bronze.erp_customer.city",
   "to": "silver.customer.city",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_customer.state",
   "to": "silver.customer.state",
   "transform": "upper"
  },
  {
   "from": "bronze.erp_customer.created_at",
   "to": "silver.customer.created_date",
   "transform": "cast to date"
  },
  {
   "from": "bronze.erp_customer.modified_at",
   "to": "silver.customer._modified_at",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_customer.customer_name",
   "to": "silver.customer._row_hash",
   "transform": "sha2 of tracked columns"
  },
  {
   "from": "bronze.erp_customer.segment_code",
   "to": "silver.customer._row_hash",
   "transform": "sha2 of tracked columns"
  },
  {
   "from": "bronze.erp_customer.region_code",
   "to": "silver.customer._row_hash",
   "transform": "sha2 of tracked columns"
  },
  {
   "from": "bronze.erp_customer.city",
   "to": "silver.customer._row_hash",
   "transform": "sha2 of tracked columns"
  },
  {
   "from": "bronze.erp_customer.state",
   "to": "silver.customer._row_hash",
   "transform": "sha2 of tracked columns"
  },
  {
   "from": "bronze.erp_product.product_id",
   "to": "silver.product.product_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_product.sku",
   "to": "silver.product.sku",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_product.product_name",
   "to": "silver.product.product_name",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_product.category",
   "to": "silver.product.category",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_product.subcategory",
   "to": "silver.product.subcategory",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_product.list_price",
   "to": "silver.product.list_price",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_product.standard_cost",
   "to": "silver.product.standard_cost",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_product.color",
   "to": "silver.product.color",
   "transform": "coalesce to 'n/a'"
  },
  {
   "from": "bronze.erp_product.modified_at",
   "to": "silver.product._modified_at",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_warehouse.warehouse_id",
   "to": "silver.warehouse.warehouse_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_warehouse.warehouse_name",
   "to": "silver.warehouse.warehouse_name",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_warehouse.city",
   "to": "silver.warehouse.city",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_warehouse.state",
   "to": "silver.warehouse.state",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_inventory_txn.txn_id",
   "to": "silver.inventory_txn.txn_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_inventory_txn.product_id",
   "to": "silver.inventory_txn.product_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_inventory_txn.warehouse_id",
   "to": "silver.inventory_txn.warehouse_id",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_inventory_txn.txn_type",
   "to": "silver.inventory_txn.txn_type",
   "transform": "pass-through"
  },
  {
   "from": "bronze.erp_inventory_txn.txn_date",
   "to": "silver.inventory_txn.txn_date",
   "transform": "cast to date"
  },
  {
   "from": "bronze.erp_inventory_txn.qty_change",
   "to": "silver.inventory_txn.qty_in",
   "transform": "greatest(qty, 0)"
  },
  {
   "from": "bronze.erp_inventory_txn.qty_change",
   "to": "silver.inventory_txn.qty_out",
   "transform": "greatest(-qty, 0)"
  },
  {
   "from": "bronze.crm_salesperson.rep_id",
   "to": "silver.salesperson.salesperson_id",
   "transform": "rename"
  },
  {
   "from": "bronze.crm_salesperson.full_name",
   "to": "silver.salesperson.salesperson_name",
   "transform": "rename"
  },
  {
   "from": "bronze.crm_salesperson.team",
   "to": "silver.salesperson.team",
   "transform": "pass-through"
  },
  {
   "from": "bronze.crm_salesperson.region",
   "to": "silver.salesperson.region",
   "transform": "pass-through"
  },
  {
   "from": "bronze.crm_salesperson.hire_date",
   "to": "silver.salesperson.hire_date",
   "transform": "parse ISO date"
  },
  {
   "from": "bronze.files_budget.fiscal_month",
   "to": "silver.budget.month_start",
   "transform": "parse YYYY-MM to date"
  },
  {
   "from": "bronze.files_budget.category",
   "to": "silver.budget.category",
   "transform": "pass-through"
  },
  {
   "from": "bronze.files_budget.region",
   "to": "silver.budget.region",
   "transform": "pass-through"
  },
  {
   "from": "bronze.files_budget.budget_amount",
   "to": "silver.budget.budget_amount",
   "transform": "cast decimal"
  },
  {
   "from": "silver.customer.customer_id",
   "to": "gold.dim_customer.customer_key",
   "transform": "surrogate key (identity)"
  },
  {
   "from": "silver.customer.customer_id",
   "to": "gold.dim_customer.customer_id",
   "transform": "pass-through"
  },
  {
   "from": "silver.customer.customer_name",
   "to": "gold.dim_customer.customer_name",
   "transform": "pass-through"
  },
  {
   "from": "silver.customer.segment",
   "to": "gold.dim_customer.segment",
   "transform": "pass-through"
  },
  {
   "from": "silver.customer.region",
   "to": "gold.dim_customer.region",
   "transform": "pass-through"
  },
  {
   "from": "silver.customer.city",
   "to": "gold.dim_customer.city",
   "transform": "pass-through"
  },
  {
   "from": "silver.customer.state",
   "to": "gold.dim_customer.state",
   "transform": "pass-through"
  },
  {
   "from": "silver.customer._row_hash",
   "to": "gold.dim_customer.valid_from",
   "transform": "SCD2: change detected via row hash"
  },
  {
   "from": "silver.customer._modified_at",
   "to": "gold.dim_customer.valid_from",
   "transform": "SCD2 effective date"
  },
  {
   "from": "silver.customer._row_hash",
   "to": "gold.dim_customer.valid_to",
   "transform": "SCD2 expire"
  },
  {
   "from": "silver.customer._row_hash",
   "to": "gold.dim_customer.is_current",
   "transform": "SCD2 flag"
  },
  {
   "from": "silver.product.product_id",
   "to": "gold.dim_product.product_key",
   "transform": "surrogate key (identity)"
  },
  {
   "from": "silver.product.product_id",
   "to": "gold.dim_product.product_id",
   "transform": "pass-through"
  },
  {
   "from": "silver.product.sku",
   "to": "gold.dim_product.sku",
   "transform": "pass-through"
  },
  {
   "from": "silver.product.product_name",
   "to": "gold.dim_product.product_name",
   "transform": "pass-through"
  },
  {
   "from": "silver.product.category",
   "to": "gold.dim_product.category",
   "transform": "pass-through"
  },
  {
   "from": "silver.product.subcategory",
   "to": "gold.dim_product.subcategory",
   "transform": "pass-through"
  },
  {
   "from": "silver.product.color",
   "to": "gold.dim_product.color",
   "transform": "pass-through"
  },
  {
   "from": "silver.product.list_price",
   "to": "gold.dim_product.list_price",
   "transform": "pass-through"
  },
  {
   "from": "silver.warehouse.warehouse_id",
   "to": "gold.dim_warehouse.warehouse_key",
   "transform": "surrogate key (identity)"
  },
  {
   "from": "silver.warehouse.warehouse_id",
   "to": "gold.dim_warehouse.warehouse_id",
   "transform": "pass-through"
  },
  {
   "from": "silver.warehouse.warehouse_name",
   "to": "gold.dim_warehouse.warehouse_name",
   "transform": "pass-through"
  },
  {
   "from": "silver.warehouse.city",
   "to": "gold.dim_warehouse.city",
   "transform": "pass-through"
  },
  {
   "from": "silver.warehouse.state",
   "to": "gold.dim_warehouse.state",
   "transform": "pass-through"
  },
  {
   "from": "silver.salesperson.salesperson_id",
   "to": "gold.dim_salesperson.salesperson_key",
   "transform": "surrogate key (identity)"
  },
  {
   "from": "silver.salesperson.salesperson_id",
   "to": "gold.dim_salesperson.salesperson_id",
   "transform": "pass-through"
  },
  {
   "from": "silver.salesperson.salesperson_name",
   "to": "gold.dim_salesperson.salesperson_name",
   "transform": "pass-through"
  },
  {
   "from": "silver.salesperson.team",
   "to": "gold.dim_salesperson.team",
   "transform": "pass-through"
  },
  {
   "from": "silver.salesperson.region",
   "to": "gold.dim_salesperson.region",
   "transform": "pass-through"
  },
  {
   "from": "silver.sales_order_line.order_date",
   "to": "gold.fact_sales.order_date_key",
   "transform": "lookup dim_date"
  },
  {
   "from": "silver.sales_order_line.ship_date",
   "to": "gold.fact_sales.ship_date_key",
   "transform": "lookup dim_date"
  },
  {
   "from": "silver.sales_order_line.customer_id",
   "to": "gold.fact_sales.customer_key",
   "transform": "lookup dim_customer as of order_date"
  },
  {
   "from": "silver.sales_order_line.order_date",
   "to": "gold.fact_sales.customer_key",
   "transform": "point-in-time SCD2 lookup"
  },
  {
   "from": "silver.sales_order_line.product_id",
   "to": "gold.fact_sales.product_key",
   "transform": "lookup dim_product"
  },
  {
   "from": "silver.sales_order_line.warehouse_id",
   "to": "gold.fact_sales.warehouse_key",
   "transform": "lookup dim_warehouse"
  },
  {
   "from": "silver.sales_order_line.salesperson_id",
   "to": "gold.fact_sales.salesperson_key",
   "transform": "lookup dim_salesperson"
  },
  {
   "from": "silver.sales_order_line.order_number",
   "to": "gold.fact_sales.order_number",
   "transform": "pass-through"
  },
  {
   "from": "silver.sales_order_line.line_number",
   "to": "gold.fact_sales.line_number",
   "transform": "pass-through"
  },
  {
   "from": "silver.sales_order_line.quantity",
   "to": "gold.fact_sales.quantity",
   "transform": "pass-through"
  },
  {
   "from": "silver.sales_order_line.gross_amount",
   "to": "gold.fact_sales.gross_amount",
   "transform": "pass-through"
  },
  {
   "from": "silver.sales_order_line.net_amount",
   "to": "gold.fact_sales.net_amount",
   "transform": "pass-through"
  },
  {
   "from": "silver.sales_order_line.gross_amount",
   "to": "gold.fact_sales.discount_amount",
   "transform": "gross - net"
  },
  {
   "from": "silver.sales_order_line.net_amount",
   "to": "gold.fact_sales.discount_amount",
   "transform": "gross - net"
  },
  {
   "from": "silver.sales_order_line.quantity",
   "to": "gold.fact_sales.cost_amount",
   "transform": "quantity * standard_cost"
  },
  {
   "from": "silver.product.standard_cost",
   "to": "gold.fact_sales.cost_amount",
   "transform": "quantity * standard_cost"
  },
  {
   "from": "silver.inventory_txn.txn_date",
   "to": "gold.fact_inventory_daily.snapshot_date_key",
   "transform": "lookup dim_date"
  },
  {
   "from": "silver.inventory_txn.product_id",
   "to": "gold.fact_inventory_daily.product_key",
   "transform": "lookup dim_product"
  },
  {
   "from": "silver.inventory_txn.warehouse_id",
   "to": "gold.fact_inventory_daily.warehouse_key",
   "transform": "lookup dim_warehouse"
  },
  {
   "from": "silver.inventory_txn.qty_in",
   "to": "gold.fact_inventory_daily.qty_in",
   "transform": "sum per day"
  },
  {
   "from": "silver.inventory_txn.qty_out",
   "to": "gold.fact_inventory_daily.qty_out",
   "transform": "sum per day"
  },
  {
   "from": "silver.inventory_txn.qty_in",
   "to": "gold.fact_inventory_daily.on_hand_qty",
   "transform": "running sum (in - out)"
  },
  {
   "from": "silver.inventory_txn.qty_out",
   "to": "gold.fact_inventory_daily.on_hand_qty",
   "transform": "running sum (in - out)"
  },
  {
   "from": "silver.budget.month_start",
   "to": "gold.fact_budget.month_date_key",
   "transform": "lookup dim_date (first of month)"
  },
  {
   "from": "silver.budget.category",
   "to": "gold.fact_budget.category",
   "transform": "pass-through"
  },
  {
   "from": "silver.budget.region",
   "to": "gold.fact_budget.region",
   "transform": "pass-through"
  },
  {
   "from": "silver.budget.budget_amount",
   "to": "gold.fact_budget.budget_amount",
   "transform": "pass-through"
  },
  {
   "from": "gold.dim_date.calendar_date",
   "to": "semantic.Date.Date",
   "transform": "rename"
  },
  {
   "from": "gold.dim_date.month_start",
   "to": "semantic.Date.Month",
   "transform": "rename"
  },
  {
   "from": "gold.dim_date.month_name",
   "to": "semantic.Date.Month Name",
   "transform": "rename"
  },
  {
   "from": "gold.dim_date.quarter",
   "to": "semantic.Date.Quarter",
   "transform": "rename"
  },
  {
   "from": "gold.dim_date.fiscal_year",
   "to": "semantic.Date.Fiscal Year",
   "transform": "rename"
  },
  {
   "from": "gold.dim_date.date_key",
   "to": "semantic.Date.date_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.dim_customer.customer_name",
   "to": "semantic.Customer.Customer",
   "transform": "rename"
  },
  {
   "from": "gold.dim_customer.segment",
   "to": "semantic.Customer.Segment",
   "transform": "rename"
  },
  {
   "from": "gold.dim_customer.region",
   "to": "semantic.Customer.Region",
   "transform": "rename"
  },
  {
   "from": "gold.dim_customer.city",
   "to": "semantic.Customer.City",
   "transform": "rename"
  },
  {
   "from": "gold.dim_customer.state",
   "to": "semantic.Customer.State",
   "transform": "rename"
  },
  {
   "from": "gold.dim_customer.customer_key",
   "to": "semantic.Customer.customer_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.dim_product.product_name",
   "to": "semantic.Product.Product",
   "transform": "rename"
  },
  {
   "from": "gold.dim_product.sku",
   "to": "semantic.Product.SKU",
   "transform": "rename"
  },
  {
   "from": "gold.dim_product.category",
   "to": "semantic.Product.Category",
   "transform": "rename"
  },
  {
   "from": "gold.dim_product.subcategory",
   "to": "semantic.Product.Subcategory",
   "transform": "rename"
  },
  {
   "from": "gold.dim_product.color",
   "to": "semantic.Product.Color",
   "transform": "rename"
  },
  {
   "from": "gold.dim_product.product_key",
   "to": "semantic.Product.product_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.dim_warehouse.warehouse_name",
   "to": "semantic.Warehouse.Warehouse",
   "transform": "rename"
  },
  {
   "from": "gold.dim_warehouse.state",
   "to": "semantic.Warehouse.Warehouse State",
   "transform": "rename"
  },
  {
   "from": "gold.dim_warehouse.warehouse_key",
   "to": "semantic.Warehouse.warehouse_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.dim_salesperson.salesperson_name",
   "to": "semantic.Salesperson.Salesperson",
   "transform": "rename"
  },
  {
   "from": "gold.dim_salesperson.team",
   "to": "semantic.Salesperson.Team",
   "transform": "rename"
  },
  {
   "from": "gold.dim_salesperson.salesperson_key",
   "to": "semantic.Salesperson.salesperson_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.order_number",
   "to": "semantic.Sales.Order Number",
   "transform": "rename"
  },
  {
   "from": "gold.fact_sales.order_date_key",
   "to": "semantic.Sales.order_date_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.ship_date_key",
   "to": "semantic.Sales.ship_date_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.customer_key",
   "to": "semantic.Sales.customer_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.product_key",
   "to": "semantic.Sales.product_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.warehouse_key",
   "to": "semantic.Sales.warehouse_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.salesperson_key",
   "to": "semantic.Sales.salesperson_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.quantity",
   "to": "semantic.Sales.quantity",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.gross_amount",
   "to": "semantic.Sales.gross_amount",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.discount_amount",
   "to": "semantic.Sales.discount_amount",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.net_amount",
   "to": "semantic.Sales.net_amount",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_sales.cost_amount",
   "to": "semantic.Sales.cost_amount",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_inventory_daily.snapshot_date_key",
   "to": "semantic.Inventory.snapshot_date_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_inventory_daily.product_key",
   "to": "semantic.Inventory.product_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_inventory_daily.warehouse_key",
   "to": "semantic.Inventory.warehouse_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_inventory_daily.on_hand_qty",
   "to": "semantic.Inventory.on_hand_qty",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_budget.month_date_key",
   "to": "semantic.Budget.month_date_key",
   "transform": "pass-through"
  },
  {
   "from": "gold.fact_budget.category",
   "to": "semantic.Budget.Category",
   "transform": "rename"
  },
  {
   "from": "gold.fact_budget.region",
   "to": "semantic.Budget.Region",
   "transform": "rename"
  },
  {
   "from": "gold.fact_budget.budget_amount",
   "to": "semantic.Budget.budget_amount",
   "transform": "pass-through"
  },
  {
   "from": "semantic.Sales.net_amount",
   "to": "semantic.Measures.Net Sales",
   "transform": "DAX"
  },
  {
   "from": "semantic.Sales.gross_amount",
   "to": "semantic.Measures.Gross Sales",
   "transform": "DAX"
  },
  {
   "from": "semantic.Sales.discount_amount",
   "to": "semantic.Measures.Discount",
   "transform": "DAX"
  },
  {
   "from": "semantic.Sales.quantity",
   "to": "semantic.Measures.Units",
   "transform": "DAX"
  },
  {
   "from": "semantic.Sales.cost_amount",
   "to": "semantic.Measures.Cost",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "semantic.Measures.Gross Margin",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Cost",
   "to": "semantic.Measures.Gross Margin",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Gross Margin",
   "to": "semantic.Measures.Margin %",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "semantic.Measures.Margin %",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "semantic.Measures.Net Sales PY",
   "transform": "DAX"
  },
  {
   "from": "semantic.Date.Date",
   "to": "semantic.Measures.Net Sales PY",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "semantic.Measures.YoY %",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Net Sales PY",
   "to": "semantic.Measures.YoY %",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "semantic.Measures.Sales by Ship Date",
   "transform": "DAX"
  },
  {
   "from": "semantic.Sales.ship_date_key",
   "to": "semantic.Measures.Sales by Ship Date",
   "transform": "DAX"
  },
  {
   "from": "semantic.Date.date_key",
   "to": "semantic.Measures.Sales by Ship Date",
   "transform": "DAX"
  },
  {
   "from": "semantic.Inventory.on_hand_qty",
   "to": "semantic.Measures.On Hand Units",
   "transform": "DAX"
  },
  {
   "from": "semantic.Date.Date",
   "to": "semantic.Measures.On Hand Units",
   "transform": "DAX"
  },
  {
   "from": "semantic.Budget.budget_amount",
   "to": "semantic.Measures.Budget",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "semantic.Measures.Budget Variance",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Budget",
   "to": "semantic.Measures.Budget Variance",
   "transform": "DAX"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "report.Sales Overview.KPI cards",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Margin %",
   "to": "report.Sales Overview.KPI cards",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.YoY %",
   "to": "report.Sales Overview.KPI cards",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "report.Sales Overview.Monthly trend",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Net Sales PY",
   "to": "report.Sales Overview.Monthly trend",
   "transform": "measure"
  },
  {
   "from": "semantic.Date.Month",
   "to": "report.Sales Overview.Monthly trend",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "report.Sales Overview.Sales by category",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Gross Margin",
   "to": "report.Sales Overview.Sales by category",
   "transform": "measure"
  },
  {
   "from": "semantic.Product.Category",
   "to": "report.Sales Overview.Sales by category",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "report.Sales Overview.Budget vs actual",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Budget",
   "to": "report.Sales Overview.Budget vs actual",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Budget Variance",
   "to": "report.Sales Overview.Budget vs actual",
   "transform": "measure"
  },
  {
   "from": "semantic.Product.Category",
   "to": "report.Sales Overview.Budget vs actual",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Date.Month",
   "to": "report.Sales Overview.Budget vs actual",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "report.Sales Overview.Shipped vs ordered",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Sales by Ship Date",
   "to": "report.Sales Overview.Shipped vs ordered",
   "transform": "measure"
  },
  {
   "from": "semantic.Date.Month",
   "to": "report.Sales Overview.Shipped vs ordered",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Measures.Net Sales",
   "to": "report.Sales Overview.Top customers",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Units",
   "to": "report.Sales Overview.Top customers",
   "transform": "measure"
  },
  {
   "from": "semantic.Customer.Customer",
   "to": "report.Sales Overview.Top customers",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Customer.Segment",
   "to": "report.Sales Overview.Top customers",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Measures.On Hand Units",
   "to": "report.Inventory Health.On hand by warehouse",
   "transform": "measure"
  },
  {
   "from": "semantic.Warehouse.Warehouse",
   "to": "report.Inventory Health.On hand by warehouse",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Measures.On Hand Units",
   "to": "report.Inventory Health.On hand vs units sold",
   "transform": "measure"
  },
  {
   "from": "semantic.Measures.Units",
   "to": "report.Inventory Health.On hand vs units sold",
   "transform": "measure"
  },
  {
   "from": "semantic.Product.Category",
   "to": "report.Inventory Health.On hand vs units sold",
   "transform": "axis / filter"
  },
  {
   "from": "semantic.Date.Month",
   "to": "report.Inventory Health.On hand vs units sold",
   "transform": "axis / filter"
  }
 ],
 "relationships": [
  {
   "fact": "Sales",
   "from": "order_date_key",
   "dim": "Date",
   "to": "date_key",
   "cardinality": "*:1",
   "active": true,
   "role": "Order date"
  },
  {
   "fact": "Sales",
   "from": "ship_date_key",
   "dim": "Date",
   "to": "date_key",
   "cardinality": "*:1",
   "active": false,
   "role": "Ship date"
  },
  {
   "fact": "Sales",
   "from": "customer_key",
   "dim": "Customer",
   "to": "customer_key",
   "cardinality": "*:1",
   "active": true
  },
  {
   "fact": "Sales",
   "from": "product_key",
   "dim": "Product",
   "to": "product_key",
   "cardinality": "*:1",
   "active": true
  },
  {
   "fact": "Sales",
   "from": "warehouse_key",
   "dim": "Warehouse",
   "to": "warehouse_key",
   "cardinality": "*:1",
   "active": true
  },
  {
   "fact": "Sales",
   "from": "salesperson_key",
   "dim": "Salesperson",
   "to": "salesperson_key",
   "cardinality": "*:1",
   "active": true
  },
  {
   "fact": "Inventory",
   "from": "snapshot_date_key",
   "dim": "Date",
   "to": "date_key",
   "cardinality": "*:1",
   "active": true,
   "role": "Snapshot date"
  },
  {
   "fact": "Inventory",
   "from": "product_key",
   "dim": "Product",
   "to": "product_key",
   "cardinality": "*:1",
   "active": true
  },
  {
   "fact": "Inventory",
   "from": "warehouse_key",
   "dim": "Warehouse",
   "to": "warehouse_key",
   "cardinality": "*:1",
   "active": true
  },
  {
   "fact": "Budget",
   "from": "month_date_key",
   "dim": "Date",
   "to": "date_key",
   "cardinality": "*:1",
   "active": true,
   "role": "Budget month",
   "note": "Budget rows land on the first day of each month; month-level visuals only."
  },
  {
   "fact": "Budget",
   "from": "Category",
   "dim": "Product",
   "to": "Category",
   "cardinality": "*:*",
   "active": true,
   "crossFilter": "single (Product filters Budget)",
   "note": "Many-to-many on category: Budget is coarser than Product."
  },
  {
   "fact": "Budget",
   "from": "Region",
   "dim": "Customer",
   "to": "Region",
   "cardinality": "*:*",
   "active": false,
   "note": "Kept inactive; region exists in both Customer and Salesperson and the business hasn't chosen one."
  }
 ],
 "hierarchies": [
  {
   "table": "Date",
   "name": "Calendar",
   "levels": [
    "Fiscal Year",
    "Quarter",
    "Month",
    "Date"
   ]
  },
  {
   "table": "Product",
   "name": "Product",
   "levels": [
    "Category",
    "Subcategory",
    "Product"
   ]
  },
  {
   "table": "Customer",
   "name": "Geography",
   "levels": [
    "Region",
    "State",
    "City",
    "Customer"
   ]
  },
  {
   "table": "Salesperson",
   "name": "Sales team",
   "levels": [
    "Team",
    "Salesperson"
   ]
  }
 ],
 "engine": [
  {
   "id": "consume",
   "name": "Consumption",
   "items": [
    "Power BI reports",
    "Excel (Analyze in Excel)",
    "Notebooks via semantic link",
    "Copilot / agents"
   ],
   "does": "Turns a visual or question into a DAX query.",
   "trace": "Visual 'Sales by category' asks for [Net Sales] and [Gross Margin] by Product[Category]."
  },
  {
   "id": "query",
   "name": "Query engine (DAX)",
   "items": [
    "Formula engine (single-threaded)",
    "Storage engine (multi-threaded, xmSQL)",
    "Measure evaluation, filter context"
   ],
   "does": "Formula engine plans the DAX; storage engine scans compressed columns in parallel.",
   "trace": "FE resolves [Gross Margin] = [Net Sales] - [Cost]; SE runs one xmSQL scan grouping Sales by Product[Category]."
  },
  {
   "id": "semantic",
   "name": "Semantic engine (VertiPaq)",
   "items": [
    "Direct Lake",
    "Import",
    "DirectQuery",
    "Relationships, RLS, calc groups"
   ],
   "does": "Holds columns in memory, dictionary-encoded; applies relationships and security.",
   "trace": "Direct Lake pages in Sales[net_amount], Sales[cost_amount], Sales[product_key] and Product[Category] on first touch (transcoding)."
  },
  {
   "id": "serve",
   "name": "Serving & SQL",
   "items": [
    "Warehouse (T-SQL, transactions)",
    "SQL analytics endpoint (read-only)",
    "Views, security"
   ],
   "does": "Gives SQL access to the same Delta tables; owns the load procedures for gold.",
   "trace": "Not on the hot path for Direct Lake on OneLake; Direct Lake on SQL endpoint can fall back here as DirectQuery."
  },
  {
   "id": "compute",
   "name": "Transform compute",
   "items": [
    "Spark notebooks",
    "Warehouse stored procedures",
    "Dataflows Gen2",
    "Pipelines (orchestration)"
   ],
   "does": "Builds silver and gold. Runs on a schedule, not at query time.",
   "trace": "Last night's load wrote new Parquet files for fact_sales; the model was reframed after the load."
  },
  {
   "id": "storage",
   "name": "Storage (OneLake)",
   "items": [
    "Delta Lake tables",
    "Parquet files (V-Order)",
    "Shortcuts",
    "Mirrored databases"
   ],
   "does": "One copy of the data, open format, read by every engine above.",
   "trace": "Column chunks for net_amount and product_key are read from V-Ordered Parquet files."
  }
 ],
 "pipelineConfig": [
  {
   "source_system": "erp",
   "source_object": "sales_order_header",
   "target": "bronze.erp_sales_order_header",
   "method": "shortcut",
   "load_type": "n/a",
   "watermark_column": null,
   "load_order": 10
  },
  {
   "source_system": "erp",
   "source_object": "sales_order_line",
   "target": "bronze.erp_sales_order_line",
   "method": "shortcut",
   "load_type": "n/a",
   "watermark_column": null,
   "load_order": 10
  },
  {
   "source_system": "erp",
   "source_object": "inventory_txn",
   "target": "bronze.erp_inventory_txn",
   "method": "copy",
   "load_type": "incremental",
   "watermark_column": "txn_id",
   "load_order": 10
  },
  {
   "source_system": "crm",
   "source_object": "salesperson",
   "target": "bronze.crm_salesperson",
   "method": "copy (REST)",
   "load_type": "full",
   "watermark_column": null,
   "load_order": 10
  },
  {
   "source_system": "files",
   "source_object": "budget/*.csv",
   "target": "bronze.files_budget",
   "method": "copy (file)",
   "load_type": "new files",
   "watermark_column": "_file_modified",
   "load_order": 10
  },
  {
   "source_system": "bronze",
   "source_object": "erp_sales_order_*",
   "target": "silver.sales_order_line",
   "method": "notebook",
   "load_type": "merge",
   "watermark_column": "_modified_at",
   "load_order": 20
  },
  {
   "source_system": "silver",
   "source_object": "customer",
   "target": "gold.dim_customer",
   "method": "stored procedure",
   "load_type": "scd2",
   "watermark_column": "_modified_at",
   "load_order": 30
  },
  {
   "source_system": "silver",
   "source_object": "sales_order_line",
   "target": "gold.fact_sales",
   "method": "stored procedure",
   "load_type": "delete-insert by date",
   "watermark_column": "_modified_at",
   "load_order": 40
  }
 ]
}