event_code

Contains codes for alarms, failures, issues, and so on.

When an event arrives with a measurement type which has an event code indicator of 1, the text from the event_observation_text value is assumed to contain an event code. The measurement type of the event defines the event_code_set value.

The fields in the event_code table are listed in the following table.

Table 1. Fields in the event_code table
Field Type Comments
event_code_set string(50) Required
event_code_set_name string(200) Required
event_code string(50) Required
language_cd string(50) Optional. This value must reference a row in the language table.
tenant_cd string(50) Optional. This value must reference a row in the tenant table.

event_code code snippet

You can use the following SQL Code snippet to retrieve master data in the format that is required by the upsert API.

For example, if you lost the original files that are used to load master data, you can use the snippet to retrieve the data, make changes, and submit the changes by using the upsert API.

The command must be on a single line, not as shown here.

SELECT M.EVENT_CODE_SET, M.EVENT_CODE_SET_NAME, M.EVENT_CODE, L.LANGUAGE_CD, 
T.TENANT_CD FROM SYSREC.MASTER_EVENT_CODE M JOIN SYSREC.LANGUAGE L ON 
M.LANGUAGE_ID = L.LANGUAGE_ID JOIN SYSREC.TENANT T ON M.TENANT_ID = 
T.TENANT_ID;