|Data provider||Read||Finbourne||Provided with LUSID|
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>
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';
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';
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.
Example 1: Retrieve all cut labels
select * from Lusid.CutLabel
Example 2: Retrieve cut labels of markets which open before 09:00
select * from Lusid.CutLabel where CutLocalTimeHours < 9 and DisplayName like '%open%'
Example 3: Retrieve cut labels of markets within a certain time zone
select * from Lusid.CutLabel where Timezone = 'Europe/London'
Example 4: Retrieve all portfolio transactions between London market open and close
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