Callable Routines API
WhereScape RED callable routines provide an Application Program Interface (API) to the WhereScape RED metadata using the following SQL-invoked routines:
Routine Name | Description |
---|---|
Ws_Api_Glossary | Adds an entry to the documentation glossary. |
Ws_Connect_Replace | Replaces the contents of a connection with details from another connection. |
Ws_Load_Change | Changes the Connection or Schema of a load table. |
Ws_Version_Clear | Purges metadata versions for all objects that do not meet the specified retention criteria. |
WsParameterRead | Returns the value and comment (for most RDBMS) of a WhereScape RED metadata Parameter. |
WsParameterReadF | Returns the value of a WhereScape RED metadata Parameter. |
WsParameterReadG | Returns the value of a "global" WhereScape RED metadata Parameter that relates to a load table. |
WsParameterWrite | Updates the value and comment of a WhereScape RED metadata Parameter or creates it. |
WsWrkAudit | Records a message in the Audit Log. |
WsWrkAuditBulk | Records multiple messages in the Audit Log. |
WsWrkError | Records a message in the Error/Detail Log. |
WsWrkErrorBulk | Records multiple messages in the Error/Detail Log. |
WsWrkTask | Updates row counts for a task in the Task Log. |
Callable Routines Names Qualifier
For PostgreSQL, it is necessary to qualify the routine name with the schema name 'red' of the WhereScape RED metadata repository. All RED-generated procedures in a PostgreSQL repository that invoke a WhereScape RED Callable Routine do so by qualifying the routine name with [METABASE] e.g. [METABASE].routine_name.
Callable Routines Common Input
The following input parameters are common to most of the WhereScape RED Callable Routines, which are primarily used for integration with the WhereScape RED Scheduler.
Input | Parameter Name | Description |
---|---|---|
Job Instance Identifier | p_sequence | Unique identifier of the running job (i.e. the running instance of a held or scheduled job) that executed the routine.
|
Job Name | p_job_name | Name of the running job that executed the routine.
|
Task Name | p_task_name | Name of the running task (of a running job) that executed the routine.
|
Job Identifier | p_job_id | Unique identifier of the held or scheduled job that the running job is a specific instance of.
|
Task Identifier | p_task_id | Unique identifier of the running task (of a running job) that executed the routine.
|
Typically, the parameter names of the WhereScape RED Callable Routines use a p_ prefix as indicated but in some routines, a v_ prefix is used instead.