- Created by Robert Ehrlich, last modified on Apr 19, 2017
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 7 Next »
In process
Scope
- 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 - 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
- Tables: inventory.sql
Field | Nullable | Data type | Constraint | Unique Constraint | Description |
---|---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | ||
INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | X | references |
AGENT_CLUSTER_ID | NOT NULL | NUMERIC | Foreign Key | X | references |
AGENT_INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | X | references |
URL | NOT NULL | VARCHAR | agent url | ||
ORDERING | NOT NULL | NUMERIC | |||
CREATED | NOT NULL | DATETIME | UTC timestamp of record creation | ||
MODIFIED | NOT NULL | DATETIME | UTC timestamp of record modification |
Field | Nullable | Data type | Constraint | Unique Constraint | Description |
---|---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | ||
INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | references | |
PROCESS_CLASS_ID | NOT NULL | NUMERIC | Foreign Key | X | references |
SCHEDULING_TYPE | NOT NULL | VARCHAR |
| ||
NUMBER_OF_AGENTS | NOT NULL | NUMERIC | |||
CREATED | NOT NULL | DATETIME | UTC timestamp of record creation | ||
MODIFIED | NOT NULL | DATETIME | UTC timestamp of record modification |
Field | Nullable | Data type | Constraint | Unique Constraint | Description |
---|---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | ||
JOB_ID | NOT NULL | NUMERIC | Foreign Key | X | references |
LOCK_ID | NOT NULL | NUMERIC | Foreign Key | X | references |
CREATED | NOT NULL | DATETIME | UTC timestamp of record creation | ||
MODIFIED | NOT NULL | DATETIME | UTC timestamp of record modification |
Field | Nullable | Data type | Constraint | Unique Constraint | Description |
---|---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | ||
INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | X | references |
FILE_TYPE | NOT NULL | VARCHAR | file types in use:
file types not used:
| ||
FILE_NAME | NOT NULL | VARCHAR | X | path from live directory e.g. | |
FILE_BASENAME | NOT NULL | VARCHAR | file base name with extension e.g. | ||
FILE_DIRECTORY | NOT NULL | VARCHAR | path calculated from the e.g. | ||
FILE_CREATED | NULL | DATETIME | UTC timestamp of the creation date of the file | ||
FILE_MODIFIED | NULL | DATETIME | UTC timestamp of the modification date of the file | ||
FILE_LOCAL_CREATED | NULL | DATETIME | local timestamp of the creation date of the file | ||
FILE_LOCAL_MODIFIED | NULL | DATETIME | local timestamp of the modification date of the file | ||
CREATED | NOT NULL | DATETIME | UTC timestamp of record creation | ||
MODIFIED | NOT NULL | DATETIME | UTC timestamp of record modification |
Field | Nullable | Data type | Constraint | Unique Constraint | Description |
---|---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | ||
OS_ID | NOT NULL | NUMERIC | Foreign Key | references | |
SCHEDULER_ID | NOT NULL | VARCHAR | X | corresponds to the SCHEDULER_ID that is specified during installation of the JobScheduler instance | |
HOSTNAME | NOT NULL | VARCHAR | X | host on which the JobScheduler instance has been installed | |
PORT | NOT NULL | NUMERIC | X | TCP port that the JobScheduler instance is listening to. Should not TCP port be specified then the UDP port is provided. | |
LIVE_DIRECTORY | NOT NULL | VARCHAR | path of the live directory | ||
VERSION | NOT NULL | VARCHAR | |||
COMMAND_URL | NOT NULL | VARCHAR | |||
URL | NOT NULL | VARCHAR | |||
TIMEZONE | NOT NULL | VARCHAR | |||
CLUSTER_TYPE | NOT NULL | VARCHAR | |||
PRECEDENCE | NUMERIC | ||||
DBMS_NAME | NOT NULL | VARCHAR | |||
DBMS_VERSION | VARCHAR | ||||
STARTED_AT | DATETIME | ||||
SUPERVISOR_ID | NUMERIC | ||||
AUTH | VARCHAR | ||||
CREATED | NOT NULL | DATETIME | UTC timestamp of record creation | ||
MODIFIED | NOT NULL | DATETIME | UTC timestamp of record modification |
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | references |
JOB_ID | NOT NULL | NUMERIC | Foreign Key | references INVENTORY_JOBS.ID |
JOB_CHAIN_ID | NOT NULL | NUMERIC | Foreign Key | references INVENTORY_JOB_CHAINS.ID |
NESTED_JOB_CHAIN_ID | NOT NULL | NUMERIC | Foreign Key | references INVENTORY_JOB_CHAINS.ID |
NAME | NOT NULL | VARCHAR | job node name:
| |
ORDERING | NOT NULL | NUMERIC | ordering of node in job chain | |
| VARCHAR | job node state as specified in the configuration | ||
NEXT_STATE | VARCHAR | next state for an order in case of successful execution | ||
ERROR_STATE | VARCHAR | error state for an order in case of unsuccessful execution | ||
JOB | VARCHAR | job name as specified in the job node configuration e.g. | ||
JOB_NAME | NOT NULL | VARCHAR | Foreign Key | corresponds to e.g. |
NESTED_JOB_CHAIN | VARCHAR | |||
NESTED_JOB_CHAIN_NAME | NOT NULL | VARCHAR | Foreign Key | corresponds to INVENTORY_JOB_CHAINS.NAME |
NODE_TYPE | NOT NULL | NUMERIC | ||
ON_ERROR | VARCHAR | |||
DELAY | NUMERIC | |||
DIRECTORY | VARCHAR | |||
REGEX | VARCHAR | |||
FILE_SINK_OP | NUMERIC | |||
MOVE_PATH | VARCHAR | |||
CREATED | NOT NULL | DATETIME | timestamp of record creation | |
MODIFIED | NOT NULL | DATETIME | timestamp of record modification |
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | references used for simplified clean-up |
FILE_ID | NOT NULL | NUMERIC | Foreign Key | references INVENTORY_FILES.ID |
NAME | NOT NULL | VARCHAR | job name e.g. | |
BASENAME | NOT NULL | VARCHAR | job base name e.g. | |
TITLE | NULL | VARCHAR | job title | |
| NOT NULL | NUMERIC | specifies if this job is part of a job chain:
| |
| 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 |
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | references |
FILE_ID | NOT NULL | NUMERIC | Foreign Key | references INVENTORY_FILES.ID |
START_CAUSE | NOT NULL | VARCHAR | the following start causes are available:
| |
NAME | NOT NULL | VARCHAR | job chain name e.g. | |
BASENAME | NOT NULL | VARCHAR | job chain base name e.g. my_jobchain for a given job chain path test/ | |
TITLE | NULL | VARCHAR | job chain title | |
CREATED | NOT NULL | DATETIME | timestamp of record creation | |
MODIFIED | NOT NULL | DATETIME | timestamp of record modification |
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | references |
JOB_CHAIN_ID | NOT NULL | NUMERIC | Foreign Key | references INVENTORY_JOB_CHAINS.ID |
NAME | NOT NULL | VARCHAR | job node name:
| |
ORDERING | NOT NULL | NUMERIC | ordering of node in job chain | |
| 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 | NULL | VARCHAR | job name as specified in the job node configuration e.g. | |
JOB_NAME | NOT NULL | VARCHAR | Foreign Key | corresponds to e.g. |
CREATED | NOT NULL | DATETIME | timestamp of record creation | |
MODIFIED | NOT NULL | DATETIME | timestamp of record modification |
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
INSTANCE_ID | NOT NULL | NUMERIC | Foreign Key | references |
FILE_ID | NOT NULL | NUMERIC | Foreign Key | references INVENTORY_FILES.ID |
NAME | NOT NULL | VARCHAR | order name e.g. | |
BASENAME | NOT NULL | VARCHAR | order base name e.g. 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. | |
JOB_CHAIN_NAME | NOT NULL | VARCHAR | Foreign Key | corresponds to e.g. |
| 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
- Tables: report.sql
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
| NOT NULL | VARCHAR |
| corresponds to |
HISTORY_ID | NOT NULL | NUMERIC | corresponds to | |
| NOT NULL | VARCHAR | corresponds to | |
TITLE | NULL | VARCHAR | order title corresponds to | |
PARENT_NAME | NOT NULL | VARCHAR | corresponds to | |
PARENT_BASENAME | NULL | VARCHAR | job chain base name | |
PARENT_TITLE | NULL | VARCHAR | corresponds to | |
START_TIME | NOT NULL | DATETIME | corresponds to | |
END_TIME | NULL | DATETIME | corresponds to | |
SYNC_COMPLETED | NOT NULL | NUMERIC | for use by the JobScheduler Reporting Interface jobs only:
| |
RESULTS_COMPLETED | NOT NULL | NUMERIC | for use by the JobScheduler Reporting Interface jobs only:
| |
CREATED | NOT NULL | DATETIME | timestamp of record creation | |
MODIFIED | NOT NULL | DATETIME | timestamp of record modification |
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
| NOT NULL | NUMERIC | corresponds to
| |
HISTORY_ID | NOT NULL | NUMERIC | corresponds to SCHEDULER_ORDER_HISTORY.HISTORY_ID | |
| NOT NULL | NUMERIC | Foreign Key | references
|
STEP | NOT NULL | NUMERIC | corresponds to | |
NAME | NOT NULL | VARCHAR | corresponds to e.g. | |
BASENAME | NOT NULL | VARCHAR | job base name e.g. | |
TITLE | NULL | VARCHAR | corresponds to INVENTORY_JOBS.TITLE | |
START_TIME | NOT NULL | DATETIME | corresponds to | |
END_TIME | NULL | DATETIME | corresponds to | |
STATE | NOT NULL | VARCHAR | corresponds to | |
CAUSE | NOT NULL | VARCHAR | start cause for execution, can be mapped to an individual start cause by use of table REPORT_MAP_CAUSES | |
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 | 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 |
Aggregation Tables
- The following tables contain aggregations for
- job steps per order
- triggers and executions per day, week, month, quarter, year
- SQL Scripts
- Tables: report.sql
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
SCHEDULER_ID | NOT NULL | VARCHAR | corresponds to
| |
HISTORY_ID | NOT NULL | NUMERIC | corresponds to SCHEDULER_ORDER_HISTORY.HISTORY_ID | |
TRIGGER_ID | NOT NULL | NUMERIC | Foreign Key | references REPORT_TRIGGERS.ID |
START_CAUSE | NOT NULL | VARCHAR | references for the value | |
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 |
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
SCHEDULER_ID | NOT NULL | VARCHAR | corresponds to
| |
HISTORY_ID | NOT NULL | NUMERIC | corresponds to SCHEDULER_ORDER_HISTORY.HISTORY_ID | |
REFERENCE_ID | NOT NULL | NUMERIC | Foreign Key | references |
REFERENCE_TYPE | NOT NULL | NUMERIC | type of reference:
| |
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 | NOT NULL | NUMERIC | calendar week e.g. 52 | |
END_MONTH | NOT NULL | NUMERIC | 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 | 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
- Tables: report.sql
- Sample Data: report_map_insert.sql
Field | Nullable | Data type | Constraint | Description |
---|---|---|---|---|
ID | NOT NULL | NUMERIC | Primary Key | |
CAUSE | NOT NULL | VARCHAR | start cause as used by JobScheduler: possible values include
additional values provided by the JobScheduler Reporting Interface include
| |
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
- Procedures: report_procedure.sql
Report about Installed Objects
- Report about jobs, job chains and orders as collected from disk.
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.
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
)
- No labels