Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Manufacturing Execution System 2023 R2

New Job Hour History Table

  • Last UpdatedDec 18, 2018
  • 3 minute read

The job_hour_history table holds job hour history data that is used in the calculation of TPM (Total Performance Management) statistics by job and hour to make reporting faster.

Because job statistical data for the current records is considered volatile with a possibility of changing frequently, only the statistical data that occurs before or during the cut‑off period prior to the current time is updated. These updates are performed on an hourly basis. Statistical data that occurs after the cut‑off period is calculated dynamically for TPM statistics and is not maintained in this table.

The default cut-off period is 2 hours, which means updates are done hourly for the 3rd hour prior to the current time. So, for example, at 9 am, the statistical data for the 6‑am hour will be updated. However, statistical data for the 7‑am hour and newer is not maintained. That statistical data will be dynamically calculated upon the TPM statistics data being called.

The job statistical data includes the following fields:

  • qty_good

  • qty_reject

  • runtime

  • downtime

  • idletime

If an entity can track OEE statistics, the following occurrences will cause data write operations to this table:

  • When a job is started, a new job_hour_history record is created

  • If a job is currently running, at the top of the hour (during hourly task execution) a new job_hour_history record is created

  • A new job is inserted in the job_history table after the fact

  • A job duration is modified after the fact and the job end time is within the time period of records in the table

  • A utilization event is modified after the fact and the event time is within the time period of records in the table

  • Production quantity adjustments are made after the fact and the production event time is within the time period of records in the table

Note the following about hour start and end fields:

  • For TPM statistics, the hour boundaries are determined based on the UTC time, for consistency and data integrity.

  • For the hour_start_utc and hour_end_utc fields, minutes and seconds are always 0. However, for the hour_start_local and hour_end_local fields, the minutes could be at the 15‑ or 30‑minute mark. For example, the IST timezone is +5:30 hours from UTC. Therefore, the local time will always begin and end at the 30‑minute mark.

Several fields in the table that could be marked as foreign keys are not in case the primary key item is eliminated, but the ID number is still meaningful.

Field

Datatype

PK

Nulls?

Description

ent_id

int32

Y

N

Identifies the entity.

wo_id

string40

Y

N

Identifies the work order of the job.

oper_id

string40

Y

N

Identifies the operation of the job.

seq_no

int32

Y

N

Identifies the row on the Job table.

job_start_utc

tdatetime

Y

N

Identifies when the job started, in UTC (GMT) time.

hour_start_utc

tdatetime

Y

N

Identifies the start of the hour in which time and production occurred, in UTC time.

Allows job TPM statistics to be recorded in hour-long increments.

hour_start_local

tdatetime

N

N

Identifies the start of the hour in which time and production occurred, in local time.

Allows job TPM statistics to be recorded in hour-long increments.

hour_end_utc

tdatetime

N

N

Identifies the end of the hour in which time and production occurred, in UTC time.

Allows job TPM statistics to be recorded in hour-long increments.

hour_end_local

tdatetime

N

N

Identifies the end of the hour in which time and production occurred, in local time.

Allows job TPM statistics to be recorded in hour-long increments.

item_id

string40

N

N

The item being produced.

std_prod_rate

float

N

N

Hours per batch. Obtained from the Job table.

batch_size

tfloat

N

N

Copy of job.batch_size. Default = 1.

qty_good

float

N

N

The total good quantity produced for this job and hour on the entity.

qty_reject

float

N

N

The total reject quantity produced for this job and hour on the entity.

runtime

int32

N

N

Total runtime on the entity for this job and hour.

downtime

int32

N

N

Total downtime on the entity for this job and hour.

idletime

int32

N

N

Total idle time on the entity for this job and hour.

last_edit_comment

string254

N

Y

Why this record was changed.

This field is internally maintained. The last transaction context is stored in this field to indicate what caused the record to be inserted or modified.

last_edit_at

tdatetime

N

N

When this record was last changed.

row_id

ID 0

N

N

Unique row identifier, for audit trail.

FK from ent_id to ent. (Cascade delete)

Related Links
TitleResults for “How to create a CRG?”Also Available in