Skip to main content
Version: V3 (Ignition 8.3)

OEE Calculation Config

Overview

The OeeCalculationConfig entity controls which locations have OEE metrics pre-computed and for which period types. Each row represents one (location, period_type) pair. The periodic backfill job reads all enabled configs, uses latest_calculation_timestamp to determine where it left off, generates up to num_rows_per_cycle new OeeCalculationRecord rows for completed periods, then advances latest_calculation_timestamp to the end_date of the last record generated.

Unlike OeeCalculationRecord entities, which are historical snapshots that persist independently, configs are live configuration. A config has no meaning without its location, so it carries a real database-level foreign key on location_id and is removed when its location is deleted.

Table Structure

The following table outlines the SQL columns for the oee_calculation_configs table, providing a brief description of each, along with sample data where applicable.

ColumnTypeUniquenessDescriptionExample
idString (ULID)UniqueUnique identifier for the entity.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
enabledBooleanIf the entity is enabled or not.true
created_dateDateTimeDate the entity was created.2025-01-15T08:00:00Z
created_byStringPerson who created the entity.TamakiMES
modified_dateDateTimeDate the entity was last modified.2025-01-15T08:00:00Z
modified_byStringLast person to modify the entity.TamakiMES
notesStringNotes about the entity.This entity has these extra notes
spare1StringFirst spare column for additional context.some extra context 1
spare2StringSecond spare column for additional context.some extra context 2
spare3StringThird spare column for additional context.some extra context 3
location_idString (ULID)Unique with period_typeReferences the location this config targets. Database-level foreign key constraint. Required.01JAP8R5RT-3FPXQABY-7KQZT6VF
period_typeString (Enum)Unique with location_idGranularity of the records this config generates (HOUR, DAY, WEEK, MONTH, SHIFT). Required.HOUR
latest_calculation_timestampInstantEnd time of the most recently generated OeeCalculationRecord for this config. Null means no records have been generated yet. Updated by the backfill job after each cycle.2025-01-15T08:00:00Z
num_rows_per_cycleIntegerMaximum number of OeeCalculationRecord rows to generate per scheduled job cycle. Default 24.24

Field Details

Foreign key

location_id carries a database-level foreign key constraint to the locations table with ON DELETE NO ACTION, consistent with all other foreign keys in the project. Cascade deletion of configs when a location is deleted is enforced at the JPA/service layer, following the same pattern as Location.children. This differs from oee_calculation_records, which intentionally omits the constraint so that historical snapshots survive location deletion.

Unique constraint

The combination of (location_id, period_type) is unique. At most one config may exist per location per period type.

latest_calculation_timestamp

Tracks backfill progress. The periodic job uses this as its starting point: the next period to generate begins at latest_calculation_timestamp. When null, the job searches for latest OeeCalculationRecord for this config and starts from there.

Setting this field to an earlier date triggers a targeted backfill of historical data. The job will regenerate (or fill gaps in) records from that point forward, up to num_rows_per_cycle records per cycle, until it catches up to the current time.

num_rows_per_cycle

Caps how much work one job cycle performs for this config. For HOUR period type, a value of 24 catches up one calendar day per cycle. Setting a high value (e.g., 200) alongside an old latest_calculation_timestamp allows rapid backfilling of months of historical data. The job always stops early if the next period's end_date would exceed the current time — no records are generated for periods that have not yet closed.