SAP ECC to PDM Source-to-Target Mapping

Complete source-to-target mapping from SAP ECC source tables and fields to each entity in the ShaDey Inc. Physical Data Model (PDM). Includes transformation logic, join conditions, cardinality notes, and mapping confidence indicators.

PDM Entities: 24
Source System: SAP ECC 6.0
Last Updated: April 2026
5Dimension Tables
1Reference Table
5Fact Tables
9Data Products
4ML/AI Products
Mapping Conventions
Confidence: Explicit = source mapping declared in the data modeler's PDM attributes. Inferred = derived from business context and SAP standard practice.
Source codes: SAP = SAP ECC table.field, DWH = derived from other PDM entities, SEQ = system-generated sequence, CALC = calculated/derived, AGG = aggregation, ML = machine learning pipeline, SCD = slowly changing dimension logic, POS = POS system, ECOM = e-commerce platform, CRM = CRM system, TMS = transport management, WMS = warehouse management.
dim_date Reference
Calendar dimension generated from a date spine script. No direct SAP source extraction. Fiscal calendar attributes aligned to ShaDey Inc.'s fiscal year (February start). Holiday calendar from reference data.
PDM AttributeTypeSAP ECC SourceTransformationConfidence
PK date_skINT--Generated YYYYMMDD integer key from calendar scriptExplicit
full_dateDATE--Calendar generation script (date spine from start to end)Explicit
day_of_weekVARCHAR(10)--DAYNAME(full_date)Explicit
month_nameVARCHAR(10)--MONTHNAME(full_date)Explicit
quarterCHAR(2)--Q + QUARTER(full_date)Explicit
yearINT--YEAR(full_date)Explicit
fiscal_yearINT--ABC fiscal calendar (February start). Custom logic.Explicit
fiscal_periodVARCHAR(10)--ABC fiscal P01-P13 mappingExplicit
is_holidayBOOLEANDWH ref_holiday_calendarLookup against reference holiday calendar tableExplicit
is_weekendBOOLEAN--DAYOFWEEK(full_date) IN (1,7)Explicit
Grain & Cardinality
One row per calendar date. No SAP extraction required. Fiscal periods should align with SAP fiscal year variant (e.g., V3 for Feb-start) configured in the ECC system.
dim_customer Core Dimension
Customer dimension with SCD Type 2 history tracking. Sources from SAP ECC customer master (KNA1), CRM contacts, and e-commerce user records. Supports multi-source customer matching.
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK customer_skBIGINT--DWH surrogate key sequenceExplicit
customer_idUUIDKNA1.KUNNRCast KUNNR to UUID. Secondary: ECOM users.user_id. Cross-reference via customer matching.Explicit
full_nameVARCHAR(200)KNA1.NAME1 + NAME2CONCAT(NAME1, ' ', NAME2). Secondary: CRM contacts.full_nameExplicit
emailVARCHAR(255)CRM / ECOMCRM: contacts.email_primary; ECOM: users.email. Not natively in KNA1.Explicit
customer_typeVARCHAR(20)KNA1.KTOKDMap account group via ref_account_group lookup (e.g., 0001=B2C, 0002=B2B)Explicit
loyalty_tierVARCHAR(20)CRMCRM: loyalty_program.current_tier. Not in ECC core.Explicit
is_active_flagBOOLEAN--CALC: EXISTS fact_sales WHERE date > DATEADD(month, -12, GETDATE())Explicit
registration_dateDATEKNA1.ERDATCustomer creation date. Secondary: ECOM users.created_atExplicit
effective_fromTIMESTAMP--SCD Type 2 row start timestamp (ETL-managed)Explicit
effective_toTIMESTAMP--SCD Type 2 row end (NULL = current row)Explicit
is_currentBOOLEAN--SCD Type 2 current row flagExplicit
Grain & Business Rules
One row per customer per SCD Type 2 version. Active customers determined by sales activity within 12 months. Customer matching across SAP, CRM, and e-commerce requires a golden record strategy (MDM or probabilistic matching). KNA1.KUNNR is the primary business key from SAP.
dim_product Core Dimension
Product/article dimension with SCD Type 2 history. Sources primarily from SAP material master (MARA, MAKT, MARC, MBEW) with enrichment from pricing conditions (KONP) and source lists (EORD).
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK product_skBIGINT--DWH surrogate key sequenceExplicit
product_idUUIDMARA.MATNRCast MATNR to UUIDExplicit
skuVARCHAR(30)MARA.MATNRFormatted as [DEPT]-[CAT]-[SEQ] patternExplicit
product_nameVARCHAR(200)MAKT.MAKTXWHERE SPRAS = 'EN' (English language key)Explicit
categoryVARCHAR(100)T023.WGBEZJOIN MARA.MATKL = T023.MATKL for material group textExplicit
departmentVARCHAR(100)T023.WGBEZParent group lookup from material group hierarchyExplicit
brandVARCHAR(100)MARA.BRAND_IDJOIN to brand_master reference tableExplicit
FK supplier_skBIGINTEORDLookup dim_supplier.supplier_sk via EORD source list (primary vendor)Explicit
unit_costDECIMAL(10,2)MBEW.STPRSStandard price from material valuationExplicit
unit_priceDECIMAL(10,2)KONP.KBETRWHERE KSCHL = 'PR00' (list price condition type)Explicit
is_currentBOOLEAN--SCD Type 2 current flagExplicit
effective_fromTIMESTAMP--SCD Type 2 row startExplicit
effective_toTIMESTAMP--SCD Type 2 row endExplicit
Key Joins
MARA.MATNR → MAKT.MATNR (WHERE SPRAS='EN') for name. MARA.MATKL → T023.MATKL for category. MARA.MATNR → EORD.MATNR (WHERE fixed vendor) for supplier. MARA.MATNR → MBEW.MATNR for cost. KONP joined via KONH access sequence for list price.
dim_supplier Core Dimension
Supplier/vendor dimension with SCD Type 2 history. Sources from SAP vendor master (LFA1) with enrichment from purchasing info records (EINA) and quality inspections.
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK supplier_skBIGINT--DWH surrogate key sequenceExplicit
supplier_idUUIDLFA1.LIFNRCast LIFNR to UUIDExplicit
supplier_nameVARCHAR(200)LFA1.NAME1 + NAME2CONCAT(NAME1, ' ', NAME2)Explicit
supplier_typeVARCHAR(20)LFA1.KTOKKMap vendor account group via ref_vendor_group lookupExplicit
country_codeCHAR(3)LFA1.LAND1Direct mappingExplicit
lead_time_daysINTEINA.APLFZPlanned delivery time from purchasing info recordExplicit
quality_ratingDECIMAL(3,2)DWH aggregationAVG(fact_quality_inspection.score) over last 4 quartersExplicit
is_certifiedBOOLEANQMELQuality notification status check (no open critical notifications)Explicit
is_currentBOOLEAN--SCD Type 2 current flagExplicit
dim_store Core Dimension
Store/channel dimension sourced from SAP plant master (T001W). Each retail store and distribution centre is modelled as an SAP plant.
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK store_skBIGINT--DWH surrogate key sequenceExplicit
store_idUUIDT001W.WERKSCast WERKS to UUIDExplicit
store_nameVARCHAR(200)T001W.NAME1Direct mappingExplicit
store_typeVARCHAR(20)T001W.FABKLMap factory calendar via ref_plant_type lookupExplicit
regionVARCHAR(100)T001W.REGIOJOIN T005S for region text: T001W.LAND1 + T001W.REGIO = T005S keyExplicit
cityVARCHAR(100)T001W.ORT01Direct mappingExplicit
country_codeCHAR(3)T001W.LAND1Direct mappingExplicit
open_dateDATET001W.ZOPNDTCustom field (Z-field) for store opening dateExplicit
is_currentBOOLEAN--SCD Type 2 current flagExplicit
Assumption
T001W is inferred from the PDM's source mapping references to "SAP:T001W.WERKS". The open_date field references a custom Z-field (ZOPNDT) which is ShaDey Inc.-specific and would need to be confirmed in the SAP data dictionary.
dim_promotion Core Dimension
Promotion dimension sourced from SAP pricing condition records (KONH/KONP). Maps promotional pricing conditions to business-friendly promotion attributes.
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK promotion_skBIGINT--DWH surrogate key sequenceExplicit
promotion_idUUIDKONP.KNUMH + KOPOSComposite key from condition record number + position. Secondary: promo_mgmt.campaign_idExplicit
promotion_nameVARCHAR(200)KONH.VTEXTCondition record description text. Secondary: promo_mgmt.campaign_nameExplicit
typeVARCHAR(30)KONP.KSCHLMap condition type: ZP01=Discount, ZP02=BOGO, etc. (ABC-specific Z-conditions)Explicit
start_dateDATEKONP.DATABCondition validity start dateExplicit
end_dateDATEKONP.DATBICondition validity end dateExplicit
discount_pctDECIMAL(5,2)KONP.KBETRKBETR / 10 (SAP stores percentage conditions scaled by 10)Explicit
is_currentBOOLEAN--SCD Type 2 current flagExplicit
Data Quality Note
SAP stores percentage condition values scaled by 10 (e.g., 15% is stored as 150 in KBETR). The transformation must divide by 10. Condition type codes (ZP01, ZP02) are ShaDey Inc.-specific and may differ from SAP standard condition types.
fact_order Fact Table
Sales order fact sourced from SAP sales document header (VBAK) and status (VBUK). One row per sales order. Grain: order level.
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK order_skBIGINT--DWH surrogate key sequenceExplicit
FK customer_skBIGINTVBAK.KUNNRLookup dim_customer.customer_sk via KUNNRExplicit
FK order_date_skINTVBAK.AUDATLookup dim_date.date_sk from AUDAT (document date)Explicit
FK store_skBIGINTVBAK.WERKSLookup dim_store.store_sk from WERKS (delivering plant)Explicit
statusVARCHAR(20)VBUK.GBSTKMap: A=Pending, B=Partial, C=CompleteExplicit
channelVARCHAR(20)VBAK.AUGRUMap order reason to channel. Secondary: ECOM orders.channelExplicit
total_amountDECIMAL(12,2)VBAK.NETWRNet value of the order. Secondary: ECOM orders.totalExplicit
fact_inventory_snapshot Fact Table
Periodic inventory snapshot sourced from SAP storage location stock (MARD). Grain: product + store + snapshot date.
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK inventory_skBIGINT--DWH surrogate key sequenceExplicit
FK product_skBIGINTMARD.MATNRLookup dim_product.product_sk via MATNRExplicit
FK store_skBIGINTMARD.WERKSLookup dim_store.store_sk via WERKSExplicit
FK date_skINT--dim_date.date_sk from snapshot run date (ETL schedule)Explicit
quantity_on_handINTMARD.LABSTUnrestricted stock quantityExplicit
quantity_reservedINTMARD.RESBEReserved stock quantityExplicit
quantity_in_transitINTMARD.UMLMEStock in transit quantityExplicit
Snapshot Strategy
MARD provides current-state stock. The DWH ETL captures daily snapshots at a fixed time (e.g., midnight) to build historical inventory positions. MARD aggregates across storage locations per plant; for storage-location-level detail, join MARD on MATNR+WERKS+LGORT.
fact_sales Fact Table
Sales transaction fact sourced from SAP billing documents (VBRK/VBRP) and POS transactions. Grain: billing document item level (one row per product per billing document).
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK sales_skBIGINT--DWH surrogate key sequenceExplicit
FK customer_skBIGINTVBRK.KUNAGLookup dim_customer.customer_sk via sold-to partyExplicit
FK product_skBIGINTVBRP.MATNRLookup dim_product.product_sk via material numberExplicit
FK store_skBIGINTVBRP.WERKSLookup dim_store.store_sk via plantExplicit
FK promotion_skBIGINTKONVLookup dim_promotion.promotion_sk via KONV condition records on billing docExplicit
FK order_date_skINTVBRK.FKDATLookup dim_date.date_sk from billing dateExplicit
quantityDECIMAL(10,3)VBRP.FKIMGBilled quantity. Secondary: POS txn_line.qtyExplicit
unit_priceDECIMAL(10,2)VBRP.NETPRNet price per unit. Secondary: POS txn_line.unit_priceExplicit
line_totalDECIMAL(12,2)VBRP.NETWRNet value of line item. Secondary: POS txn_line.ext_priceExplicit
currency_codeCHAR(3)VBRK.WAERKDocument currency. Secondary: POS txn_header.currencyExplicit
fact_shipment Fact Table
Shipment/delivery fact sourced from SAP delivery documents (LIKP) and external TMS. Grain: delivery document level.
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK shipment_skBIGINT--DWH surrogate key sequenceExplicit
FK order_skBIGINTLIKP.VBELNLookup fact_order.order_sk via delivery-to-order document flowExplicit
FK store_skBIGINTLIKP.WERKSLookup dim_store.store_sk via shipping plantExplicit
FK ship_date_skINTLIKP.WADAT_ISTLookup dim_date.date_sk from actual goods issue dateExplicit
carrier_codeVARCHAR(20)LIKP.ROUTERoute code. Secondary: TMS shipment.carrier_scacExplicit
tracking_numberVARCHAR(50)TMS / 3PLExternal tracking from TMS shipment.tracking_id or 3PL APIExplicit
delivery_dateDATELIKP.LFDATPlanned delivery date. Secondary: TMS shipment.pod_dateExplicit
fact_return Fact Table
Returns fact sourced from SAP return orders (VBAK doc type RE) and credit memos (VBRK billing type G2). Grain: return order level.
PDM AttributeTypeSAP ECC SourceTransformation / Join LogicConfidence
PK return_skBIGINT--DWH surrogate key sequenceExplicit
FK original_order_skBIGINTVBAK.AUGRULookup fact_order.order_sk via reference document (return-to-original link)Explicit
FK product_skBIGINTVBAP.MATNRLookup dim_product.product_sk via return order item materialExplicit
FK customer_skBIGINTVBAK.KUNNRLookup dim_customer.customer_sk via return order sold-toExplicit
FK return_date_skINTVBAK.AUDATdim_date.date_sk from return order document date (RE type)Explicit
reason_codeVARCHAR(20)VBAK.AUGRUReturn reason code. Secondary: ECOM returns.reasonExplicit
refund_amountDECIMAL(12,2)VBRK.NETWRCredit memo net value (billing type G2). Secondary: ECOM refunds.amountExplicit

Data Products

Data products are derived from core DWH entities (dimensions and facts) rather than sourced directly from SAP ECC. Their SAP lineage flows through the core entities above. The mappings below show the DWH-level derivation; for the ultimate SAP source, trace through the parent entity mappings.

dp_customer_360 Data Product
Unified customer profile combining transactional metrics, behavioural signals, and ML-derived scores. Daily refresh. Ultimate SAP lineage: KNA1 → dim_customer → fact_sales → dp_customer_360.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK customer_skBIGINTdim_customer.customer_skWHERE is_current = TRUEKNA1.KUNNR
total_ordersINTfact_orderCOUNT(DISTINCT order_sk) WHERE status <> 'Cancelled'VBAK
total_spendDECIMAL(14,2)fact_salesSUM(line_total) all-timeVBRP.NETWR
avg_order_valueDECIMAL(10,2)Calculatedtotal_spend / NULLIF(total_orders, 0)--
first_purchase_dateDATEfact_sales + dim_dateMIN(dim_date.full_date) via order_date_skVBRK.FKDAT
last_purchase_dateDATEfact_sales + dim_dateMAX(dim_date.full_date) via order_date_skVBRK.FKDAT
preferred_categoryVARCHAR(100)fact_sales + dim_productMODE(dim_product.category) by frequencyT023.WGBEZ via MARA.MATKL
churn_risk_scoreDECIMAL(5,4)ml_feature_storeWHERE feature_name = 'churn_risk_90d'ML pipeline
ltv_predicted_12mDECIMAL(12,2)ml_feature_storeWHERE feature_name = 'ltv_next_12m'ML pipeline
customer_segmentVARCHAR(50)dp_customer_segmentationsegment_nameML pipeline
snapshot_dateDATECalculatedETL run date (daily refresh)--
dp_product_catalog Data Product
Enriched product catalog combining master data with sales velocity, pricing, and customer ratings. Ultimate SAP lineage: MARA/MAKT/MBEW → dim_product → dp_product_catalog.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK product_skBIGINTdim_product.product_skWHERE is_current = TRUEMARA.MATNR
skuVARCHAR(30)dim_product.skuDirectMARA.MATNR
product_nameVARCHAR(200)dim_product.product_nameDirectMAKT.MAKTX
category_l1VARCHAR(100)dim_product.departmentTop level (department)T023 hierarchy
category_l2VARCHAR(100)dim_product.categoryMid level (category)T023.WGBEZ
brandVARCHAR(100)dim_product.brandDirectMARA.BRAND_ID
supplier_nameVARCHAR(200)dim_supplier.supplier_nameJOIN via dim_product.supplier_skLFA1.NAME1
current_priceDECIMAL(10,2)dim_product.unit_priceWHERE is_current = TRUEKONP.KBETR (PR00)
costDECIMAL(10,2)dim_product.unit_costWHERE is_current = TRUEMBEW.STPRS
margin_pctDECIMAL(5,2)Calculated(current_price - cost) / NULLIF(current_price, 0) * 100--
velocity_rankINTfact_salesRANK() OVER (ORDER BY SUM(quantity) DESC) last 30dVBRP.FKIMG
avg_ratingDECIMAL(3,2)ECOM product_reviewsAVG(rating) by product_idExternal
review_countINTECOM product_reviewsCOUNT(*) by product_idExternal
dp_net_sales_daily Data Product
Daily net sales metric aggregated by store. Grain: date + store. Ultimate SAP lineage: VBRK/VBRP → fact_sales/fact_return → dp_net_sales_daily.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK date_skINTfact_sales.order_date_skGroup by dateVBRK.FKDAT
PK store_skBIGINTfact_sales.store_skGroup by storeVBRP.WERKS
gross_salesDECIMAL(14,2)fact_salesSUM(line_total) GROUP BY date_sk, store_skVBRP.NETWR
return_amountDECIMAL(14,2)fact_returnSUM(refund_amount) GROUP BY date_sk, store_skVBRK.NETWR (G2)
discount_amountDECIMAL(14,2)fact_sales + dim_promotionSUM(line_total * discount_pct / 100)KONP.KBETR
tax_amountDECIMAL(14,2)Calculatedgross_sales * ref_tax_rate.rate by store jurisdictionMLAN tax class
net_salesDECIMAL(14,2)Calculatedgross_sales - return_amount - discount_amount - tax_amount--
transaction_countINTfact_salesCOUNT(DISTINCT sales_sk)VBRK count
dp_sales_dailyData Product
Daily sales performance by date + store + product. Grain: date + store + product. Aggregated from fact_sales.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK date_skINTfact_sales.order_date_skGroup by dateVBRK.FKDAT
PK store_skBIGINTfact_sales.store_skGroup by storeVBRP.WERKS
PK product_skBIGINTfact_sales.product_skGroup by productVBRP.MATNR
total_qtyDECIMAL(12,3)fact_salesSUM(quantity)VBRP.FKIMG
gross_amountDECIMAL(14,2)fact_salesSUM(line_total)VBRP.NETWR
transaction_countINTfact_salesCOUNT(sales_sk)VBRK count
avg_unit_priceDECIMAL(10,2)Calculatedgross_amount / NULLIF(total_qty, 0)--
avg_basket_sizeDECIMAL(10,2)fact_orderAVG(total_amount) by store, dateVBAK.NETWR
dp_inventory_positionData Product
Current inventory position with days-of-supply and reorder signals. Grain: product + store (latest snapshot). Ultimate SAP lineage: MARD → fact_inventory_snapshot → dp_inventory_position.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK product_skBIGINTfact_inventory_snapshotLatest date_skMARD.MATNR
PK store_skBIGINTfact_inventory_snapshotLatest date_skMARD.WERKS
on_handINTfact_inventory_snapshot.quantity_on_handLatest snapshotMARD.LABST
reservedINTfact_inventory_snapshot.quantity_reservedLatest snapshotMARD.RESBE
in_transitINTfact_inventory_snapshot.quantity_in_transitLatest snapshotMARD.UMLME
availableINTCalculatedon_hand - reserved--
avg_daily_sales_30dDECIMAL(8,2)dp_sales_dailySUM(total_qty) / 30 over last 30 daysVBRP.FKIMG
days_of_supplyDECIMAL(6,1)Calculatedavailable / NULLIF(avg_daily_sales_30d, 0)--
reorder_flagBOOLEANCalculateddays_of_supply < safety_stock_days_thresholdMARC.MINBE (reorder point)
dp_supplier_scorecardData Product
Supplier performance scorecard by fiscal period. Grain: supplier + period. Aggregated from shipments, returns, and purchase orders.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK supplier_skBIGINTdim_supplierWHERE is_current = TRUELFA1.LIFNR
PK periodVARCHAR(10)dim_datefiscal_year + fiscal_period--
on_time_delivery_pctDECIMAL(5,2)fact_shipmentCOUNT(WHERE delivery ≤ promise) / COUNT(*) * 100LIKP.LFDAT vs VBEP.EDATU
quality_defect_rateDECIMAL(5,4)fact_return + fact_salesCOUNT(returns WHERE reason = quality) / COUNT(sales) * 100VBAK.AUGRU + VBRP
lead_time_avg_daysDECIMAL(5,1)fact_shipment + fact_orderAVG(DATEDIFF(delivery - order_date))LIKP + VBAK dates
cost_variance_pctDECIMAL(5,2)Calculated(actual_cost - contracted_cost) / contracted_cost * 100EKPO prices
fill_rate_pctDECIMAL(5,2)fact_order + fact_shipmentSUM(delivered_qty) / SUM(ordered_qty) * 100LIPS + VBAP qtys
overall_scoreDECIMAL(3,2)CalculatedWeighted avg (OTD*0.3 + Quality*0.25 + Lead*0.2 + Cost*0.15 + Fill*0.1)--
dp_store_analyticsData Product
Daily store performance analytics. Grain: store + date. Combines sales data with footfall from POS and shrinkage from WMS.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK store_skBIGINTdim_storeDirectT001W.WERKS
PK date_skINTdim_dateDirect--
revenueDECIMAL(14,2)dp_net_sales_dailySUM(net_sales)VBRP.NETWR
footfallINTPOS store_trafficvisitor_count daily totalExternal (POS)
transactionsINTdp_net_sales_dailySUM(transaction_count)VBRK count
conversion_rateDECIMAL(5,2)Calculatedtransactions / NULLIF(footfall, 0) * 100--
avg_basketDECIMAL(10,2)Calculatedrevenue / NULLIF(transactions, 0)--
sales_per_sqftDECIMAL(10,2)Calculatedrevenue / dim_store.square_footageT001W custom field
shrinkage_pctDECIMAL(5,2)WMS shrinkage_reportloss_value / revenue * 100External (WMS)
dp_promotion_effectivenessData Product
Promotion lift analysis comparing pre-promotion baseline with promotional period sales. Grain: promotion + product. Computed post-promotion.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK promotion_skBIGINTdim_promotionDirectKONP.KNUMH
PK product_skBIGINTdim_productDirectMARA.MATNR
baseline_qtyDECIMAL(10,2)dp_sales_dailyAVG(total_qty) 4 weeks pre-promoVBRP.FKIMG
promo_qtyDECIMAL(10,2)dp_sales_dailyAVG(total_qty) during promo periodVBRP.FKIMG
lift_pctDECIMAL(5,2)Calculated(promo_qty - baseline_qty) / NULLIF(baseline_qty, 0) * 100--
discount_costDECIMAL(12,2)fact_sales + dim_promotionSUM(line_total * discount_pct / 100) during promoKONP.KBETR
incremental_revenueDECIMAL(12,2)Calculated(promo_qty - baseline_qty) * avg_unit_price * promo_days--
roiDECIMAL(8,2)Calculated(incremental_revenue - discount_cost) / NULLIF(discount_cost, 0) * 100--
dp_order_fulfillmentData Product
Order fulfillment tracking: order-to-ship and order-to-deliver metrics with on-time flags. Grain: one row per order.
PDM AttributeTypeDWH SourceTransformationUltimate SAP Source
PK order_skBIGINTfact_orderDirectVBAK.VBELN
promise_dateDATESAP directVBEP.EDATU (schedule line confirmed date)VBEP.EDATU
days_to_shipINTCalculatedDATEDIFF(day, order_date, ship_date)--
days_to_deliverINTCalculatedDATEDIFF(day, order_date, delivery_date)--
on_time_flagBOOLEANCalculateddelivery_date ≤ promise_date--
complete_flagBOOLEANCalculatedALL line items shipped--
return_flagBOOLEANfact_returnEXISTS WHERE original_order_sk = order_skVBAK (RE type)

ML / AI Data Products

Machine learning data products are derived from DWH entities and ML pipeline outputs. They have no direct SAP ECC source tables; their SAP lineage is indirect through the core dimensions and facts.

dp_customer_segmentationML/AI
RFM-based customer segmentation with ML-derived cluster assignments and propensity scores. Trained quarterly via k-means clustering.
PDM AttributeTypeSourceNotes
PK customer_skBIGINTdp_customer_360.customer_skCurrent customers only
segment_idINTML: k-means cluster_idk=6, trained quarterly
segment_nameVARCHAR(50)ML: cluster label mappingChampions, Loyal, At Risk, Lost, etc.
rfm_recencyINTdp_customer_360.days_since_last_purchaseRecency score
rfm_frequencyINTdp_customer_360.total_ordersFrequency score
rfm_monetaryDECIMAL(14,2)dp_customer_360.total_spendMonetary value
propensity_scoreDECIMAL(5,4)ml_feature_storeWHERE feature_name = 'purchase_propensity'
model_versionVARCHAR(20)ML: model registryVersion tag (e.g., v2.3.1)
dp_demand_forecastML/AI
ML-driven demand forecast at product + store + day grain with 90-day horizon. Prophet/LightGBM ensemble model.
PDM AttributeTypeSourceNotes
PK product_skBIGINTdim_productAll active products
PK store_skBIGINTdim_storeAll active stores
PK forecast_date_skINTdim_date (future)Future dates, 90-day horizon
forecast_qtyDECIMAL(10,2)ML pipeline outputProphet/LightGBM ensemble, daily grain
confidence_lowDECIMAL(10,2)ML pipeline output80% prediction interval lower bound
confidence_highDECIMAL(10,2)ML pipeline output80% prediction interval upper bound
model_versionVARCHAR(20)ML: model registryVersion tag for reproducibility
ml_feature_storeML/AI
Centralised feature store for all ML features. Entity-key-value structure supporting point-in-time feature retrieval. No direct SAP source.
PDM AttributeTypeSourceNotes
PK feature_skBIGINTSEQDWH surrogate key
feature_nameVARCHAR(100)ML: Feature registrye.g., churn_risk_90d, ltv_next_12m
feature_valueDECIMAL(18,6)ML pipeline outputComputed feature value
entity_keyVARCHAR(100)DWH entity PKcustomer_id, product_id, etc.
entity_typeVARCHAR(50)ML: entity enumcustomer, product, store, order
event_timestampTIMESTAMPCalculatedPoint-in-time for feature correctness
versionINTML: Feature registryAuto-incremented feature version
ml_training_snapshotML/AI
Immutable snapshots of ML training datasets for reproducibility and audit. No direct SAP source.
PDM AttributeTypeSourceNotes
PK dataset_skBIGINTSEQDWH surrogate key
model_nameVARCHAR(100)ML: model registryModel identifier
created_atTIMESTAMPCalculatedSnapshot creation timestamp (immutable)
feature_versionINTml_feature_store.versionFeature version at time of snapshot
row_countINTCalculatedCOUNT(*) of snapshotted rows
label_columnVARCHAR(50)ML: model configTarget variable definition
train_split_pctDECIMAL(3,2)ML: model configTrain/test split ratio
source_query_hashVARCHAR(64)CalculatedSHA256 of the SQL that generated the dataset
is_pii_freeBOOLEANCalculatedAutomated PII scan result (must be TRUE)