Lusid.Calendar

Type

Read/write

Author

Availability

Data provider

Read

Finbourne

Provided with LUSID

The Lusid.Calendar provider enables you to write a Luminesce SQL query that retrieves information about your calendars.

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

See also: Lusid.Calendar.Writer

Basic usage

select * from Lusid.Calendar where <filter-expression>

Query parameters

Lusid.Calendar 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 = 'Lusid.Calendar' and FieldType = 'Parameter';

Data fields

By default, Lusid.Calendar 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 = 'Lusid.Calendar' and FieldType = 'Column';

Note: Fields marked 'main' are returned by queries that start select ^ from Lusid.Calendar.

Examples

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

Example 1: Retrieve all calendars

select * from Lusid.Calendar

Example 2: Retrieve calendars from a certain scope

select * from Lusid.Calendar where Scope = 'CoppClarkHolidayCalendars'

Example 3: Retrieve calendar information for bonds

You can use Lusid.Calendar to retrieve additional information about the payment calendars attached to your bonds, such as the scope the calendar is retrieved from and the days included in the calendar weekend mask.

select 
    b.DisplayName, 
    b.DomCcy, 
    b.LusidInstrumentId,
    c.*
from Lusid.Instrument.Bond b
left outer join Lusid.Calendar c
    on b.FlowConventionsPaymentCalendars = c.Code; 

The table of data returned by the query looks like this: