--- title: "Lusid.ComplianceRule" slug: "lusid-compliancerule" updated: 2026-09-10T14:32:56Z published: 2026-09-10T14:32:56Z canonical: "support.lusid.com/lusid-compliancerule" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Lusid.ComplianceRule | Type | Read/write | Author | Availability | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | 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] > Note > > The LUSID user running the query must have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users) 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](/v1/docs/luminesce-read-provider-1), [Lusid.ComplianceRuleResult](/v1/docs/lusid-complianceruleresult), [Lusid.ComplianceRuleResult.Breakdown](/v1/docs/lusid-comlianceruleresult-breakdown) ## Basic usage ```sql select * from Lusid.ComplianceRule where ``` ## 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](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql 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](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, IsMain, SampleValues, Description from Sys.Field where TableName = 'Lusid.ComplianceRule' and FieldType = 'Column'; ``` > [!NOTE] > Note > > Fields marked 'main' are returned by queries that include a caret character, for example `select ^ from Lusid.ComplianceRule`. ## Examples > [!NOTE] > Note > > For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples). ### Example 1: Retrieve all active compliance rules in a scope ```sql select * from Lusid.ComplianceRule where RuleScope = 'PMS' and Active = true; ``` ### Example 2: Retrieve a particular compliance rule ```sql 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 ```sql select * from Lusid.ComplianceRule where PortfolioGroupScope = 'Finbourne-Examples' and PortfolioGroupCode = 'EU'; ```