--- title: "Lusid.RunCompliance" slug: "luminesce-read-provider-1" updated: 2026-09-10T14:33:46Z published: 2026-09-10T14:33:46Z canonical: "support.lusid.com/luminesce-read-provider-1" --- > ## 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.RunCompliance | Type | Read/write | Author | Availability | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Write | FINBOURNE | Provided with LUSID | The `Lusid.RunCompliance` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that triggers a [compliance run](/v1/docs/what-is-compliance-in-lusid) and returns the outcome of that run. > [!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.ComplianceRule](/v1/docs/lusid-compliancerule), [Lusid.ComplianceRuleResult](/v1/docs/lusid-complianceruleresult), [Lusid.ComplianceRuleResult.Breakdown](/v1/docs/lusid-comlianceruleresult-breakdown) ## Basic usage ```sql select * from Lusid.RunCompliance where ; ``` ## Query parameters `Lusid.RunCompliance` has parameters that enable you to specify the compliance run to create. > [!NOTE] > Note > > `RuleScope`, `RunScope` and `Recipe` are mandatory. 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.RunCompliance' and FieldType = 'Parameter'; ``` ## Data fields By default, `Lusid.RunCompliance` 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, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.RunCompliance' and FieldType = 'Column'; ``` > [!NOTE] > Note > > Fields marked 'main' are returned by queries that include a caret character, for example `select ^ from Lusid.RunCompliance`. ## Write errors We recommend examining the results of every query against `Lusid.RunCompliance` using the `WriteError`, `WriteErrorCode` and `WriteErrorDetail` fields. If unsuccessful, `Lusid.RunCompliance` returns a `WriteError` message, along with a `WriteErrorCode` and `WriteErrorDetail`, to help you discover why LUSID could not kick off the compliance run. ## Examples > [!NOTE] > Note > > For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples). ### Example 1: Kick off a compliance run ```sql select * from Lusid.RunCompliance where  RuleScope = 'PMS'  and RunScope = 'PMS'  and Recipe = 'Finbourne-Examples/Recipe'; ``` ### Example 2: Run compliance on orders, allocations, and transactions ```sql select * from Lusid.RunCompliance where  RuleScope = 'PMS'  and RunScope = 'PMS'  and Recipe = 'Finbourne-Examples/Recipe'  and IncludeEntityTypes = 'OrdersAndAllocations'; ``` ### Example 3: Retrieve the breach and error information from a compliance run ```sql select  ComplianceRunScope,  ComplianceRunCode,  BreachedRuleIds,  WriteError,  WriteErrorDetail from Lusid.RunCompliance where  RuleScope = 'PMS'  and RunScope = 'PMS'  and Recipe = 'Finbourne-Examples/Recipe'; ```