Lusid.CutLabel

Type

Read/write

Author

Availability

Data provider

Read

Finbourne

Provided with LUSID

The Lusid.CutLabel provider enables you to write a Luminesce SQL query that retrieves information about your cut labels.

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

See also: Lusid.CutLabel.Writer

select * from Lusid.CutLabel where <filter-expression>
SQL

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

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

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

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

select * from Lusid.CutLabel
SQL
select * from Lusid.CutLabel where CutLocalTimeHours < 9 and DisplayName like '%open%'
SQL
select * from Lusid.CutLabel where Timezone = 'Europe/London'
SQL

You can use cut labels to convert an abstract string time, such as LondonClose, to a fixed datetime. This can then be passed into another provider to retrieve data with the same effective datetimes as your cut labels.

@@fromDT = select Previous from Lusid.CutLabel where Code = 'LondonOpen';
@@untilDT = select Next from Lusid.CutLabel where Code = 'LondonClose';

select * from Lusid.Portfolio.Txn where 
PortfolioScope = 'Finbourne-Examples' and PortfolioCode = 'UK-Equities'
and FromEffectiveAt = @@fromDT and UntilEffectiveAt = @@untilDT
SQL