offdataai
SAP · data model template

SAP Plant Maintenance Analytics data model

Kimball warehouse for SAP PM: an accumulating maintenance-order snapshot with created/released/completed milestone date roles and planned vs actual cost and labor, a transaction-grain notification fact (QMEL) with breakdown duration, and a periodic equipment-downtime fact computing MTBF, MTTR, and availability. Order/notification numbers (aufnr/qmnum) are degenerate dimensions; equipment master is SCD2; SAP fiscal year/period drives period reporting.

SAP Plant Maintenance (PM) analytics migrated from ECC / S/4HANA into Snowflake. Covers the maintenance-order lifecycle (AUFK/AFIH, accumulating snapshot created → released → completed), maintenance notifications (QMEL), and an equipment-downtime reliability snapshot yielding MTBF/MTTR and availability, over conformed equipment (EQUI, SCD2), functional location (IFLOT), work center (CRHD), plant (T001W), and order/notification-type dimensions with SAP fiscal-period accounting. It is a Kimball dimensional model: fact tables at a declared grain surrounded by conformed dimensions, ready for BI tools and a semantic layer.

KimballSAPSOXISO-55000
11
tables
120
columns
16
relationships
1
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: Snowflake). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

maintenance_ordersnotificationsreliabilityconformed_dimensions

Design decisions

  • Accumulating snapshot for the maintenance-order lifecycle

    A PM order (AUFK/AFIH) passes through well-defined milestones (created → released → started → technically completed → closed); an accumulating snapshot with a date-role foreign key per milestone captures lead time, response time, and repair time in one row.

  • Separate notification transaction fact

    QMEL notifications (malfunctions, requests) occur at higher volume and a different grain than orders; a transaction-grain notification fact with damage/cause codes and breakdown duration captures failure events independent of whether an order was raised.

  • Periodic reliability snapshot for MTBF/MTTR

    Mean-time-between-failures and mean-time-to-repair are derived ratios over a period that are awkward to compute on raw events; a periodic snapshot at equipment/period grain pre-aggregates breakdown and repair counts to give stable reliability KPIs and availability.

  • SCD2 on the equipment master

    EQUI attributes (functional-location installation, criticality ABC, responsible plant) change as assets are moved and reclassified; type-2 history preserves the as-was technical-object structure required for comparable reliability trend analysis.

Tables in the SAP Plant Maintenance Analytics model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Fact tables (3)

fct_maintenance_order

Grain: one row per maintenance order (AUFK/AFIH, accumulating snapshot created→released→completed)

Accumulating snapshot tracking the PM order lifecycle; supplies MTTR repair time.

ColumnTypeKeys
maintenance_order_keybigintPK
equipment_keybigint
functional_location_keybigint
work_center_keybigint
plant_keybigint
order_type_keybigint
fiscal_period_keybigint
created_date_keybigint
released_date_keybigint
scheduled_start_date_keybigint
actual_start_date_keybigint
completed_date_keybigint
closed_date_keybigint
maintenance_ordervarchar
priorityvarchar
planner_groupvarchar
planned_labor_hoursdecimal
actual_labor_hoursdecimal
planned_costdecimal
actual_costdecimal
material_costdecimal
labor_costdecimal
lead_time_daysinteger
response_time_hoursdecimal
repair_time_hoursdecimal
order_statusvarchar
is_breakdownboolean

fct_notification

Grain: one row per maintenance notification (QMEL)

Transaction-grain notification fact — malfunction and request events.

ColumnTypeKeys
notification_keybigintPK
date_keybigint
fiscal_period_keybigint
equipment_keybigint
functional_location_keybigint
plant_keybigint
notification_type_keybigint
completion_date_keybigint
notification_numbervarchar
reference_ordervarchar
priorityvarchar
damage_codevarchar
cause_codevarchar
breakdown_indicatorboolean
breakdown_duration_hoursdecimal
response_time_hoursdecimal
notification_countinteger

fct_equipment_downtime

Grain: one row per equipment per fiscal period (downtime / reliability periodic snapshot)

Periodic snapshot of equipment reliability — MTBF/MTTR and availability.

ColumnTypeKeys
fiscal_period_keybigint
equipment_keybigint
functional_location_keybigint
plant_keybigint
operating_hoursdecimal
downtime_hoursdecimal
planned_downtime_hoursdecimal
breakdown_countinteger
repair_countinteger
total_repair_hoursdecimal
mtbf_hoursdecimal
mttr_hoursdecimal
availability_pctdecimal
maintenance_costdecimal

Dimension tables (6)

dim_date

Grain: one row per calendar day

ColumnTypeKeys
date_keybigintPK
full_datedateBK
day_of_monthsmallint
month_numbersmallint
month_namevarchar
quartersmallint
yearsmallint
is_business_dayboolean
is_period_endboolean

dim_fiscal_period

Grain: one row per SAP fiscal year/period (gjahr/monat)

ColumnTypeKeys
fiscal_period_keybigintPK
fiscal_period_codevarcharBK
fiscal_yearsmallint
fiscal_periodsmallint
fiscal_variantvarchar
period_start_datedate
period_end_datedate
is_special_periodboolean
period_statusvarchar

dim_equipment

Grain: one row per equipment per SCD2 version

SCD type 2

ColumnTypeKeys
equipment_keybigintPK
equipment_numbervarcharBK
equipment_descriptionvarchar
equipment_categoryvarchar
technical_object_typevarchar
manufacturervarchar
model_numbervarchar
serial_numbervarchar
acquisition_datedate
functional_locationvarchar
plantvarchar
abc_indicatorvarchar
is_activeboolean

dim_functional_location

Grain: one row per functional location (IFLOT)

ColumnTypeKeys
functional_location_keybigintPK
functional_locationvarcharBK
functional_location_labelvarchar
descriptionvarchar
location_categoryvarchar
superior_functional_locationvarchar
plantvarchar
cost_centervarchar

dim_work_center

Grain: one row per work center (CRHD)

ColumnTypeKeys
work_center_keybigintPK
work_centervarcharBK
work_center_namevarchar
plantvarchar
work_center_categoryvarchar
responsible_personvarcharPII
capacity_categoryvarchar

dim_plant

Grain: one row per plant

ColumnTypeKeys
plant_keybigintPK
plantvarcharBK
plant_namevarchar
cityvarchar
countryvarchar
company_codevarchar

Lookup tables (2)

dim_order_type

Grain: one row per SAP maintenance order type

ColumnTypeKeys
order_type_keybigintPK
order_typevarcharBK
order_type_namevarchar
maintenance_categoryvarchar
is_plannedboolean

dim_notification_type

Grain: one row per SAP PM notification type

ColumnTypeKeys
notification_type_keybigintPK
notification_typevarcharBK
notification_type_namevarchar
notification_categoryvarchar
priority_defaultvarchar

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • fct_maintenance_order.equipment_key → dim_equipment (many-to-one)
  • fct_maintenance_order.functional_location_key → dim_functional_location (many-to-one)
  • fct_maintenance_order.work_center_key → dim_work_center (many-to-one)
  • fct_maintenance_order.plant_key → dim_plant (many-to-one)
  • fct_maintenance_order.order_type_key → dim_order_type (many-to-one)
  • fct_maintenance_order.fiscal_period_key → dim_fiscal_period (many-to-one)
  • fct_notification.date_key → dim_date (many-to-one)
  • fct_notification.fiscal_period_key → dim_fiscal_period (many-to-one)
  • fct_notification.equipment_key → dim_equipment (many-to-one)
  • fct_notification.functional_location_key → dim_functional_location (many-to-one)
  • fct_notification.plant_key → dim_plant (many-to-one)
  • fct_notification.notification_type_key → dim_notification_type (many-to-one)
  • fct_equipment_downtime.fiscal_period_key → dim_fiscal_period (many-to-one)
  • fct_equipment_downtime.equipment_key → dim_equipment (many-to-one)
  • fct_equipment_downtime.functional_location_key → dim_functional_location (many-to-one)
  • fct_equipment_downtime.plant_key → dim_plant (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time