Scope
Inventory Tables
- Provide technical information on the standard data model that is available for reports.
- Users can use this information to create their own reports from the data model, see JobScheduler Reporting Interface (1.9.x, 1.10.x) - Technical Information - Data Model Customization
- SQL scripts in this article are provided for PostgreSQL. The SQL scrpts for the respective DBMS are provided by the JobScheduler installer.
Standard Data Model
Standard Tables
Inventory Tables
- The following tables are managed by reporting inventory jobs that create an inventory of existing jobs, job chains and orders.
- Records are overwritten by each run of the reporting inventory jobs.
- SQL Scripts
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary Key | | SCHEDULER_ID | NOT NULL | VARCHAR | | corresponds to the SCHEDULER_ID that is specified during installation of the JobScheduler instance | HOSTNAME |
|
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary key | | SCHEDULER_ID | NOT NULL | VARCHAR | | | HOSTNAME | NOT NULL | VARCHAR | | | PORT | NOT NULL | NUMERIC | | Status |
---|
colour | Red |
---|
title | to be discussed |
---|
|
TCP, UDP Port extra? | LIVE_DIRECTORY | NOT NULL | VARCHAR | | | host on which the JobScheduler instance has been installed | PORT CREATED | NOT NULL | DATETIMENUMERIC | | | TCP port that the JobScheduler instance is listening to. Should not TCP port be specified then the UDP port is provided. | LIVE_DIRECTORY MODIFIED | NOT NULL | DATETIMEVARCHAR | | | path of the live directory | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Expand |
---|
|
|
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary keyKey | | INSTANCE_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_INSTANCES.ID | FILE_TYPE | NOT NULL | VARCHAR | | file types in use: Not treatedfile types not used: process_class config lock schedule ...
| FILE_NAME | NOT NULL | VARCHAR | | Path path from live directory e.g. test/my_job.job.xml | FILE_BASENAME | NOT NULL | VARCHAR | | file base name with extension e.g. my File basename my_job.job.xml
| FILE_DIRECTORY | NOT NULL | VARCHAR | | Path path calculated from the live directory e.g. test | FILE_CREATED | NULL | DATETIME | | UTC time timestamp of the creation date of the file | FILE_MODIFIED | NULL | DATETIME | | UTC time timestamp of the last change modification date of the file | FILE_LOCAL_CREATED | NULL | DATETIME | | Local time local timestamp of the creation date of the file | FILE_LOCAL_MODIFIED | NULL | DATETIME | | Local time local timestamp of the last change modification date of the file | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary keyKey | | INSTANCE_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_INSTANCES.ID for easy cleanupused for simplified clean-up | FILE_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_FILES.ID | NAME | NOT NULL | VARCHAR | | Job job name e.g. test/my_job for a given job (path test/my_job.job.xml )
| BASENAME | NOT NULL | VARCHAR | | Job job base name e.g. my_job ( for a given job path test/my_job.job.xml ) | TITLE | NULL | VARCHAR | | job title | IS_ORDER_JOB
| NOT NULL | NUMERIC | | specifies if this job is part of a job chain: | IS_RUNTIME_DEFINED
| NOT NULL | NUMERIC | | specifies if a start time has been configured: | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Expand |
---|
title | INVENTORY_JOB_CHAINS |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary keyKey | | INSTANCE_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_INSTANCES.ID for easy cleanupused for simplified clean-up | FILE_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_FILES.ID | START_CAUSE | NOT NULL | VARCHAR | | the following start causes are available: | NAME | NOT NULL | VARCHAR | | Job job chain name e.g. test/my_jobchain ( for a given job chain path test/my_jobchain.job_chain.xml )
| BASENAME | NOT NULL | VARCHAR | | Job job chain base name e.g. my_jobchain ( for a given job chain path test/my_jobchain.job_chain.xml ) | TITLE | NULL | VARCHAR | | job chain title | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Expand |
---|
title | INVENTORY_JOB_CHAIN_NODES |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary keyKey | | INSTANCE_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_INSTANCES.ID for easy cleanupused for simplified clean-up | JOB_CHAIN_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_JOB_CHAINS.ID | NAME | NOT NULL | VARCHAR | | job node name: file_order_source job_chain_node
Status |
---|
colour | Red |
---|
title | to be discussed |
---|
|
Eventuell END_NODE ... | ORDERING | NOT NULL | NUMERIC | | Node order | | ORDERING | NOT NULL | NUMERIC | | ordering of node in job chain | STATE
STATE
| NULL | VARCHAR | | job node state as specified in the configuration | NEXT_STATE | NULL | VARCHAR | | next state for an order in case of successful execution | ERROR_STATE | NULL | VARCHAR | | | error state for an order in case of unsuccessful execution | JOB | JOB | NULL | VARCHAR | | job name as specified in the job node configuration e.g. ../my_job | JOB_NAME | NOT NULL | VARCHAR | Foreign keyKey | corresponds to INVENTORY_JOBS.NAME. Paths are resolved to absolute values starting from the live directory e.g. test/my_job | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Expand |
---|
title | INVENTORY_JOB_CHAIN_ORDERS |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary keyKey | | INSTANCE_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_INSTANCES.ID
for easy cleanupused for simplified clean-up | FILE_ID | NOT NULL | NUMERIC | Foreign keyKey | references INVENTORY_FILES.ID | JOB_CHAIN_NAME | NOT NULL | VARCHAR | Foreign key | | order name INVENTORY_JOB_CHAINS.NAME
e.g. Order name test/my_jobchain
| ORDER_ID | NOT NULL | VARCHAR | | ,my_order for a given order (path test/my_jobchain,my_order.order.xml )
| TITLE BASENAME | NOT NULL | VARCHAR | | | IS_RUNTIME_DEFINED
| NOT NULL | NUMERIC | | | CREATED | NOT NULL | DATETIME | | | MODIFIED | NOT NULL | DATETIME | | |
|
Fact Tables
Status |
---|
colour | Red |
---|
title | to be discussed |
---|
|
Eine neue extra Tabelle REPORT_TRIGGER_CONFIGURATIONS für JobChains - mit den PARENT_xxx Sachen???
order base name e.g. my_jobchain,my_order for a given job chain path test/my_jobchain,my_order.order.xml | TITLE | NULL | VARCHAR | | order title | ORDER_ID | NOT NULL | VARCHAR | | order identification (unique per job chain) e.g. my_order for a given order path test/my_jobchain,my_order.order.xml
| JOB_CHAIN_NAME | NOT NULL | VARCHAR | Foreign Key | corresponds to INVENTORY_JOB_CHAINS.NAME e.g. test/my_jobchain
| IS_RUNTIME_DEFINED
| NOT NULL | NUMERIC | | specifies if a start time has been configured: | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Fact Tables
- The following tables are used to collect facts from the JobScheduler history.
- No standalone jobs are given. Fact tables contain job chain starts exclusively.
- These tables can be used to create individual reports.
- SQL Scripts
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary Key | | SCHEDULER_ID
|
|
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary key | | SCHEDULER_ID
| NOT NULL | VARCHAR | | SCHEDULER_ORDER_HISTORY.SCHEDULER_ID
| HISTORY_ID | NOT NULL | NUMERIC | | SCHEDULER_ORDER_HISTORY.HISTORY_ID
| NAME
| NOT NULL | VARCHAR | | SCHEDULER_ORDER_HISTORY.ORDER_ID
| TITLE | NULL | VARCHAR | | Title INVENTORY_JOB_CHAIN_ORDERS.TITLE
| PARENT_NAME | NOT NULL | VARCHAR | | corresponds to SCHEDULER_ORDER_HISTORY. JOBSCHEDULER_ CHAINID
| PARENTHISTORY_BASENAMEID | NOT NULL | VARCHARNUMERIC | | Job chain basename | corresponds to SCHEDULER_ORDER_HISTORY.HISTORY_ID
| NAME
| NOT NULL | VARCHAR | | corresponds to SCHEDULER_ORDER_HISTORY.ORDER_ID | PARENT_TITLE | NULL | VARCHAR | | order title corresponds to INVENTORY_JOB_CHAINSCHAIN_ORDERS.TITLE | STARTPARENT_TIMENAME | NOT NULL | DATETIMEVARCHAR | | corresponds to SCHEDULER_ORDER_HISTORY.START_TIME JOB_CHAIN | PARENT_BASENAME | NULL | VARCHAR | | job chain base name | PARENT_TITLE | NULL | VARCHAR | | corresponds to INVENTORY_JOB_CHAINS.TITLE
| STARTEND_TIME | NOT NULL | DATETIME | | corresponds to SCHEDULER_ORDER_HISTORY.ENDSTART_TIME | SYNCEND_COMPLETEDTIME | NOT NULL | NUMERICDATETIME | | corresponds to SCHEDULER_ORDER_HISTORY.END_TIME | SYNC | | RESULTS_COMPLETED | NOT NULL | NUMERIC | | | CREATED | NOT NULL | DATETIME | | | MODIFIED | NOT NULL | DATETIME | | | for use by the JobScheduler Reporting Interface jobs only: specifies if a synchronization has been configured and has been completed successfully: | RESULTS_COMPLETED | NOT NULL | NUMERIC | | for use by the JobScheduler Reporting Interface jobs only: specifies if all job nodes have been completed successfully: | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary keyKey | | SCHEDULER_ID
| NOT NULL | NUMERIC | Foreign key | corresponds to SCHEDULER_ORDER_HISTORY.SCHEDULER_ID
| HISTORY_ID | NOT NULL | NUMERIC | Foreign key | corresponds to SCHEDULER_ORDER_HISTORY.HISTORY_ID | TRIGGER_ID
| NOT NULL | NUMERIC | Foreign keyKey | references REPORT_TRIGGERS .ID
| STEP | NOT NULL | NUMERIC | | Sequence of steps corresponds to SCHEDULER_ORDER_STEP_HISTORY.STEP | NAME | NOT NULL | VARCHAR | | corresponds to SCHEDULER_HISTORY.JOB_NAME e.g. test/my_job | BASENAME | NOT NULL | VARCHAR | | Job job base name e.g. my_job ( , for a given job path test/my_job.job.xml ) | TITLE | NULL | VARCHAR | | corresponds to INVENTORY_JOBS.TITLE | START_TIME | NOT NULL | DATETIME | | corresponds to SCHEDULER_ORDER_STEP_HISTORY.START_TIME | END_TIME | NULL | DATETIME | | corresponds to SCHEDULER_ORDER_STEP_HISTORY.END_TIME | STATE | NOT NULL | VARCHAR | | corresponds to SCHEDULER_ORDER_STEP_HISTORY.STATE | CAUSE | NOT NULL | VARCHAR | | | start cause for execution, can be mapped to an individual start cause by use of table REPORT_MAP_CAUSES | ERROR ERROR | NOT NULL | NUMERIC | | specifies if an error occurred: | ERROR_CODE | NULL | VARCHAR | | JobScheduler error code | ERROR_TEXT | NULL | VARCHAR | | | error message | IS_RUNTIME_DEFINED CREATED | NOT NULL | DATETIMENUMERIC | | specifies if a start time has been configured: | CREATED | | MODIFIED | NOT NULL | DATETIME | | |
|
Custom Tables
timestamp of record creation | MODIFIED |
|
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERICDATETIME | Primary key | | NAME | NOT NULL | VARCHAR | | | TITLE | NULL | VARCHAR | timestamp of record modification |
|
Aggregation Tables
- The following tables contain aggregations for
- job steps per order
- triggers and executions per day, week, month, quarter, year
- SQL Scripts
Expand |
---|
title | REPORT_TRIGGER_JOBSRESULTS |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary | keyKey | | NAME SCHEDULER_ID | NOT NULL | VARCHAR | | | TITLE | NULL | VARCHAR | | |
|
Expand |
---|
|
corresponds to SCHEDULER_ORDER_HISTORY.SCHEDULER_ID
| HISTORY_ID | NOT NULL | NUMERIC | | corresponds to SCHEDULER_ORDER_HISTORY.HISTORY_ID | TRIGGER_ | Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary key | | Foreign Key | references REPORT_TRIGGERS.ID | START_CAUSE NAME | NOT NULL | VARCHAR | | | TITLE | NULL | VARCHAR | | |
|
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary key | | JOB_ID | NOT NULL | VARCHAR | Foreign key | REPORT_JOBS.ID | APPLICATION_ID | NOT NULL | NUMERIC | Foreign key | REPORT_APPLICATIONS.ID |
|
references SCHEDULER_HISTORY.CAUSE of the first step for the value order check the start cause given in INVENTORY_JOB_CHAINS.START_CAUSE | STEPS | NOT NULL | NUMERIC | | specifies the number of job steps that have been executed | ERROR | NOT NULL | NUMERIC | | specifies if an error occurred | ERROR_CODE | NULL | VARCHAR | | JobScheduler error code | ERROR_TEXT | NULL | VARCHAR | | error message | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Expand |
---|
title | REPORT_EXECUTION_DATES |
---|
|
Expand |
---|
title | REPORT_MAP_JOB_MANDATORS |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary | keyKey | | JOBSCHEDULER_CHAINID | NOT NULL | VARCHAR | Foreign key | REPORT_JOBS.ID | | corresponds to SCHEDULER_ORDER_HISTORY.SCHEDULER_ID
| HISTORYMANDATOR_ID | NOT NULL | NUMERIC | Foreign key | REPORT_MANDATOR.ID |
|
Expand |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary key | | CAUSE | NOT NULL | VARCHAR | | | MAPPED_CAUSE | NOT NULL | VARCHAR | | |
|
Aggregation Tables
| corresponds to SCHEDULER_ORDER_HISTORY.HISTORY_ID | REFERENCE_ID | NOT NULL | NUMERIC | Foreign Key | references REPORT_TRIGGERS.ID or REPORT_EXECUTIONS.ID | REFERENCE_TYPE | NOT NULL | NUMERIC | | type of reference: 0: references REPORT_TRIGGERS 1: references REPORT_EXECUTIONS
| START_DAY | NOT NULL | NUMERIC | | calendar day e.g. 1 | START_WEEK | NOT NULL | NUMERIC | | calendar week e.g. 52 | START_MONTH | NOT NULL | NUMERIC | | calendar month e.g. 12 | START_QUARTER | NOT NULL | NUMERIC | | quarter e.g. 1 | START_YEAR | NOT NULL | NUMERIC | | year e.g. 2015 | END_DAY | NOT NULL | NUMERIC | | calendar day e.g. 1 | END_WEEK |
|
Expand |
---|
title | REPORT_TRIGGER_RESULTS |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary key | | TRIGGER_ID | NOT NULL | NUMERIC | Foreign key | Reference to the | START_CAUSE | NOT NULL | VARCHAR | | SCHEDULER_HISTORY.CAUSE of the 1.st step
if equals "order" check in the INVENTORY_JOB_CHAINS.START_CAUSE
| STEPS | NOT NULL | NUMERIC | | Number of steps SCHEDULER_ORDER_STEP_HISTORY.STEP of the last step or1 for not order jobs
| calendar week e.g. 52 | END_MONTH | ERROR | NOT NULL | NUMERIC | | | ERROR_CODE | NULL | VARCHAR | | | ERROR_TEXT | NULL | VARCHAR | | | calendar month e.g. 12 | END_QUARTER | NOT NULL | NUMERIC | | quarter e.g. 1 | END_YEAR | NOT NULL | NUMERIC | | calendar year e.g. 2015 | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | |
|
Expand |
---|
timestamp of record modification |
|
Mapping Tables
- The following tables are used for the mapping of report data. Users can add individual records that are used for the mapping of results in individual reports:
- Mapping of start causes for jobs
- Contents in these tables is optional, however, their existence is required.
- SQL Scripts
Expand |
---|
title | REPORT_MAP_CAUSES | title | REPORT_EXECUTION_DATES |
---|
|
Field | Nullable | Data type | Constraint | Description |
---|
ID | NOT NULL | NUMERIC | Primary | keyKey | | REFERENCE_ID CAUSE | NOT NULL | NUMERIC | Foreign key | Reference to the REPORT_TRIGGERS.ID orREPORT_EXECUTIONS.ID
| REFERENCE_TYPE | NOT NULL | NUMERIC | | 0 - REPORT_TRIGGERS 1 - REPORT_EXECUTIONS
| START_DAY | NOT NULL | NUMERIC | | Calendar day 1 | START_WEEK | NOT NULL | NUMERIC | | Calendar week 52 | START_MONTH | NOT NULL | NUMERIC | | Calendar month 12 | START_QUARTER | NOT NULL | NUMERIC | | Quarter 1 | START_YEAR | NOT NULL | NUMERIC | | Year 2015 | END_DAY | NOT NULL | NUMERIC | | Calendar day 1 | END_WEEK | NOT NULL | NUMERIC | | Calendar week 52 | END_MONTH | NOT NULL | NUMERIC | | Calendar month 12 | END_QUARTER | NOT NULL | NUMERIC | | Quarter 1 | END_YEAR | NOT NULL | NUMERIC | | Calendar year 2015 | CREATED | NOT NULL | DATETIME | | | MODIFIED | NOT NULL | DATETIME | | VARCHAR | | start cause as used by JobScheduler: possible values include order : job start triggered by manual ordermin_tasks : job start triggered by forced minimum number of tasksdelay_after_error : job start due to a setback eventperiod_single : job start triggered by order start timeperiod_repeat : job start triggered by order repeat intervalqueue_at : job start scheduled manually or by task congestion
additional values provided by the JobScheduler Reporting Interface include file_trigger : job start due to an incoming file
| MAPPED_CAUSE | NOT NULL | VARCHAR | | individual mapping of start cause | CREATED | NOT NULL | DATETIME | | timestamp of record creation | MODIFIED | NOT NULL | DATETIME | | timestamp of record modification |
|
Standard Procedures
- For most DBMS it is recommended to use views or procedures in order to speed up queries by pre-compiled statements.
- The following procedures implement the use of the standard tables for reporting results.
- SQL Scripts
Report about Installed Objects
- Report about jobs, job chains and orders as collected from disk.
Expand |
---|
title | REPORT_INSTALLED_OBJECTS |
---|
|
CREATE OR REPLACE FUNCTION REPORT_INSTALLED_OBJECTS(start_date DATE, end_date DATE) RETURNS TABLE ( "ID" BIGINT, "SCHEDULER_ID" VARCHAR(100), "HOSTNAME" VARCHAR(255), "JOB_CHAIN" VARCHAR(255), "JOB_NAME" VARCHAR(255), "JOB_BASENAME" VARCHAR(100), "JOB_CHAIN_BASENAME" VARCHAR(100), "JOB_TITLE" VARCHAR(255), "JOB_CHAIN_TITLE" VARCHAR(255), "CAUSE" VARCHAR(100), "IS_ACTIVE_CALENDAR" INT, "FILE_CREATED" TIMESTAMP, "FILE_MODIFIED" TIMESTAMP ) |
Report about Execution Summary
- Report about executions of jobs and job chains.
Expand |
---|
title | REPORT_EXECUTION_SUMMARY |
---|
|
CREATE OR REPLACE FUNCTION REPORT_EXECUTION_SUMMARY(start_date DATE, end_date DATE) RETURNS TABLE ( "ID" BIGINT, "SCHEDULER_ID" VARCHAR(100), "HOSTNAME" VARCHAR(255), "JOB_CHAIN" VARCHAR(255), "JOB_NAME" VARCHAR(255), "JOB_BASENAME" VARCHAR(100), "JOB_CHAIN_BASENAME" VARCHAR(100), "JOB_TITLE" VARCHAR(255), "JOB_CHAIN_TITLE" VARCHAR(255), "CAUSE" VARCHAR(100), "IS_ACTIVE_CALENDAR" INT, "START_TIME" TIMESTAMP, "END_TIME" TIMESTAMP, "START_DATE" DATE, "END_DATE" DATE ) |