--- title: "Lusid.ComplianceRuleResult" slug: "lusid-complianceruleresult" updated: 2026-09-10T14:33:15Z published: 2026-09-10T14:33:15Z canonical: "support.lusid.com/lusid-complianceruleresult" --- > ## 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.ComplianceRuleResult | 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.ComplianceRuleResult` provider enables you to write a Luminesce SQL query that retrieves the outcome of a compliance run, one row per rule. To understand *why* a rule result shows as `Failed` or `Warning`, for example which instrument or property caused it, use `Lusid.ComplianceRuleResult.Breakdown`. > [!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.ComplianceRule](/v1/docs/lusid-compliancerule), [Lusid.ComplianceRuleResult.Breakdown](/v1/docs/lusid-comlianceruleresult-breakdown) ## Basic usage ```sql select * from Lusid.ComplianceRuleResult where ``` ## Query parameters `Lusid.ComplianceRuleResult` 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.ComplianceRuleResult' and FieldType = 'Parameter'; ``` ## Data fields By default, `Lusid.ComplianceRuleResult` 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.ComplianceRuleResult' and FieldType = 'Column'; ``` > [!NOTE] > Note > > Fields marked 'main' are returned by queries that include a caret character, for example `select ^ from Lusid.ComplianceRuleResult`. ## 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 rule results for a compliance run ```sql select * from Lusid.ComplianceRuleResult where RunScope = 'PMS'  and RunCode = 'bbbcfccd-d773-4a30-b478-d5bb9e34363e'; ``` ### Example 2: Retrieve only the rules that did not pass ```sql select * from Lusid.ComplianceRuleResult where RunScope = 'PMS'  and RunCode = 'bbbcfccd-d773-4a30-b478-d5bb9e34363e'  and RuleStatus != 'Passed'; ``` ### Example 3: Retrieve the results for a particular rule from a run ```sql select * from Lusid.ComplianceRuleResult where RunScope = 'PMS'  and RunCode = 'bbbcfccd-d773-4a30-b478-d5bb9e34363e'  and ComplianceRuleScope = 'PMS'  and ComplianceRuleCode = 'instrument-permitted-domicile'; ``` ### Example 4: Join a rule result with its breakdown for more details ```sql @@RunScope = select 'PMS'; @@RunCode = select 'bbbcfccd-d773-4a30-b478-d5bb9e34363e'; @RuleResult = select * from Lusid.ComplianceRuleResult where RunScope = @@RunScope  and RunCode = @@RunCode  and ComplianceRuleScope = 'PMS'  and ComplianceRuleCode = 'instrument-permitted-domicile'; @Breakdown = use Lusid.ComplianceRuleResult.Breakdown with @@RunScope, @@RunCode --runScope={@@RunScope} --runCode={@@RunCode} enduse; select  rr.ComplianceRuleScope,  rr.ComplianceRuleCode,  rr.RuleStatus,  rr.ErrorDetail,  bd.* from @RuleResult rr inner join @Breakdown bd on rr.ComplianceRuleCode = bd.ComplianceRuleCode; ```