Type | Read/write | Author | Availability |
|---|---|---|---|
Read | FINBOURNE | Provided with LUSID |
The Lusid.ComplianceRule provider enables you to write a Luminesce SQL query that retrieves compliance rules and the portfolio groups each rule applies to.
Note
The LUSID user running the query must have sufficient access control permissions to both use the provider and read compliance data. This should automatically be the case if you are the domain owner.
See also: Lusid.RunCompliance, Lusid.ComplianceRuleResult, Lusid.ComplianceRuleResult.Breakdown
Basic usage
select * from Lusid.ComplianceRule where <filter-expression>Query parameters
Lusid.ComplianceRule 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.ComplianceRule' and FieldType = 'Parameter';Data fields
By default, Lusid.ComplianceRule 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, SampleValues, Description from Sys.Field where TableName = 'Lusid.ComplianceRule' and FieldType = 'Column';Note
Fields marked 'main' are returned by queries that include a caret character, for example
select ^ from Lusid.ComplianceRule.
Examples
Note
For more example Luminesce SQL queries, visit our Github repo.
Example 1: Retrieve all active compliance rules in a scope
select * from Lusid.ComplianceRule
where RuleScope = 'PMS'
and Active = true;Example 2: Retrieve a particular compliance rule
select * from Lusid.ComplianceRule
where RuleScope = 'PMS'
and RuleCode = 'instrument-permitted-domicile';Example 3: Retrieve all compliance rules that apply to a particular portfolio group
select * from Lusid.ComplianceRule
where PortfolioGroupScope = 'Finbourne-Examples'
and PortfolioGroupCode = 'EU';