Scheduler.Schedule

Type

Read/write

Author

Availability

Data provider

Read

Finbourne

Provided with LUSID

The Scheduler.Schedule provider enables you to write a Luminesce SQL query that retrieves schedule data from Scheduler.

Note: The LUSID user running the query must have sufficient access control permissions to both use the provider and read Scheduler schedule data. This should automatically be the case if you are the domain owner.

See also: Scheduler.Job, Scheduler.Schedule.Run

Basic usage

select * from Scheduler.Schedule where <filter-expression>;

Query parameters

Scheduler.Schedule has parameters that enable you to filter or refine a query.

To list available parameters, their data types, default values, and an explanation for each, run the following query using a suitable tool:

select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Scheduler.Schedule' and FieldType = 'Parameter';

Data fields

By default, Scheduler.Schedule returns a table of data populated with particular fields (columns). You can return a subset of these fields.

To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a suitable tool:

select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Scheduler.Schedule' and FieldType = 'Column';

Note: Fields marked 'main' are returned by queries that include a caret character, for example select ^ from Scheduler.Schedule.

Examples

Note: For more example Luminesce SQL queries, visit our Github repo.

Example 1: Retrieve first ten schedules

select * from Scheduler.Schedule limit 10

Example 2: Retrieve all schedules that exist for a particular job

select * from Scheduler.Schedule where JobScope = 'transactions' and JobCode = 'upsert-transactions'

Example 3: Retrieve trigger information and the arguments a schedule is configured to run with

select Trigger, Arguments from Scheduler.Schedule where ScheduleScope = 'transactions' and ScheduleCode = 'upsert-transactions-schedule'

Example 4: Retrieve all schedules created by a particular person

select * from Scheduler.Schedule where Author = 'Joe Bloggs'

Example 5: Retrieve schedule run history for a particular schedule name

select * 
from Scheduler.Schedule s
join Scheduler.Job.History h
  on s.ScheduleScope = h.ScheduleScope
  and s.ScheduleCode = h.ScheduleCode
where s.Name = 'Automate upsert transactions'