Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The standard data model can be customized by use of additional tables and procedures.
  • Such tables are not required by the JobScheduler Reporting Interface.

Sample Custom Tables

  • The following tables implement samples for the customization of reports:
    • Assigning applications to jobs
    • Assigning mandators to jobs
  • Samples are presented for instructional use only.

Custom Jobs

  • Status
    colourRed
    titleTODO
     Clarify removal of this sample

...

Assigning Applications to Jobs

  • Should a report present information on a number of jobs that are used for the same application then the following tables could be used:

Application Master Data

Expand
titleREPORT_CUSTOM_JOBSAPPS
FieldNullableData typeConstraintDescription
IDNOT NULLNUMERICPrimary Key 
NAMENOT NULLVARCHAR job application name
TITLENULLVARCHAR job application title

...

Application Joins to Jobs

...

Expand
title
  • Should a report present information on a number of jobs that are used for the same application then the following tables could be used:

Application Master Data

Expand
titleREPORT_CUSTOM_JOB_APPS
Expand
title
FieldNullableData typeConstraintDescription
IDNOT NULLNUMERICPrimary Key 
JOB_NAMENOT NULLVARCHAR application nameTITLEcorresponds to INVENTORY_JOBS.NAME
APP_NAMENOT NULLVARCHAR application title

Application Joins to Jobs

JOB_APPS
corresponds REPORT_CUSTOM_
FieldNullableData typeConstraintDescription
IDNOT NULLNUMERICPrimary Key 
JOB_NAMENOT NULLVARCHAR corresponds to INVENTORY_JOBS.NAME
APP_NAMENOT NULLVARCHAR corresponds REPORT_CUSTOM_APPS.NAME

Assigning Mandators to Jobs

...

Expand
titleREPORT_CUSTOM_JOB_MANDATORS
FieldNullableData typeConstraintDescription
IDNOT NULLNUMERICPrimary Key 
JOB_CHAINNOT NULLVARCHARForeign Keyreferences REPORT_JOBS.ID
MANDATOR_IDNOT NULLNUMERICForeign Keyreferences REPORT_MANDATOR.ID

Sample Custom 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 above custom tables for reporting results that are aggregated per application and mandator.

Report about Installed Objects

  • The standard procedure is improved to map installed objects to applications and mandators.

Custom Report on Installed Objects

Expand
titleREPORT_CUSTOM_INSTALLED_OBJECTS

CREATE OR REPLACE FUNCTION REPORT_CUSTOM_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" DATE,
"FILE_MODIFIED" DATE,
"MANDATOR_NAME" VARCHAR(100),
"APPLICATION_NAME" VARCHAR(100)
)

Report about Executions

Custom Report on Execution Summary

Expand
titleREPORT_CUSTOM_EXECUTION_SUMMARY

CREATE OR REPLACE FUNCTION REPORT_CUSTOM_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,
"MIN_START_DATE" DATE,
"MAX_START_DATE" DATE,
"MANDATOR_NAME" VARCHAR(100),
"APPLICATION_NAME" VARCHAR(100)
)