--- title: "Lusid.ComplianceRuleResult.Breakdown" slug: "lusid-comlianceruleresult-breakdown" tags: ["luminesce ", "provider"] updated: 2026-09-10T14:38:27Z published: 2026-09-10T14:38:27Z canonical: "support.lusid.com/lusid-comlianceruleresult-breakdown" --- > ## 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.Breakdown | **Type** | **Read/write** | **Author** | **Availability** | | --- | --- | --- | --- | | [Direct provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | FINBOURNE | Provided with LUSID | The `Lusid.ComplianceRuleResult.Breakdown` provider enables you to write a [Luminesce query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that retrieves the underlying contributions to a rule’s result in a compliance run. For example, it can show you the lineage, properties, and numerator and denominator values used in the compliance run; [learn more about compliance rules in LUSID](/v1/docs/understanding-compliance-rules-and-templates). > [!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.ComplianceRule](/v1/docs/lusid-compliancerule) ## Basic usage ```sql @@RunScope = select ''; @@RunCode = select ''; @breakdown = use Lusid.ComplianceRuleResult.Breakdown with @@RunScope, @@RunCode --runScope={@@RunScope} --runCode={@@RunCode} enduse; select * from @breakdown; ``` ## Input tables `Lusid.ComplianceRuleResult.Breakdown` takes in scalar variables and outputs a table of data; [see example 1](/v1/docs/toolspivot#example-1-pivoting-basic-input-data). ## Options `Lusid.ComplianceRuleResult.Breakdown` has options that enable you to refine a query. An option takes the form `--<option>=<value>`, for example `--runScope=PMS`. Note that no spaces are allowed either side of the `=` operator. Current options at article update time are listed in the table below. For the very latest information, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries) and examine the online help: ```sql @x = use Lusid.ComplianceRuleResult.Breakdown --help enduse; select * from @x; ``` | Current options | Explanation | | --- | --- | | `runScope` | The scope of the compliance run. [String] | | `runCode` | The code of the compliance run. [String] | | `asAt` | The asAt datetime of the query. [DateTime, Default: latest] | | `maxDynamicColumns` | The maximum number of `ResultsUsed` and `PropertiesUsed` keys to expand into columns, applied independently to each. [Int32, Default: 6] | | `maxLineageDepth` | The maximum number of lineage stages to expand. Each stage generates one column named after that stage's `Label`, containing its `SubLabel` value. [Int32, Default: 6] | ## Examples ### Example 1: Retrieve the breakdown for a specific compliance run In this example, we retrieve the breakdown for the result in [this Lusid.ComplianceRuleResult example](/v1/docs/lusid-complianceruleresult#example-1-retrieve-all-active-compliance-rules-in-a-scope). ```sql @@RunScope = select 'PMS'; @@RunCode = select 'bbbcfccd-d773-4a30-b478-d5bb9e34363e'; @breakdown = use Lusid.ComplianceRuleResult.Breakdown with @@RunScope, @@RunCode --runScope={@@RunScope} --runCode={@@RunCode} enduse; select * from @breakdown; ``` `Lusid.ComplianceRuleResult.Breakdown` returns one row per breakdown group. Part of the table of data returned is as follows, containing multiple rows for the same rule and portfolio: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-303EKZS6.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A00%3A42Z&se=2026-11-18T20%3A00%3A42Z&sr=b&sp=r&sig=5BL0OmwSbJ8Z3ITx5Dv9lrPpgah56bMvUMUoTk%2BAQAw%3D) The following columns identify the run and rule a row belongs to: - `ComplianceRunScope` - `ComplianceRunCode` - `ComplianceRuleScope` - `ComplianceRuleCode` The remaining columns are dynamic and depend on the compliance template and variation involved in the run. > [!NOTE] > Note > > The `Initial` column refers to the first lineage stage in the compliance rule sequence, which has its `Label` set to `Initial`. You can see this, for example, at the end of [How do I perform a pre-trade compliance run and view the results?](/v1/docs/how-do-i-perform-a-pre-trade-compliance-run-and-view-the-results#viewing-and-interpreting-compliance-run-results) ### Example 2: Kick off a compliance run and retrieve its results breakdown In this example, we use the `ComplianceRunCode` returned by [Lusid.RunCompliance](/v1/docs/luminesce-read-provider-1) to immediately retrieve the breakdown for the run. ```sql @@ComplianceRunScope = select 'PMS'; @@ComplianceRunCode = select ComplianceRunCode from Lusid.RunCompliance where IncludeEntityTypes = 'OrdersAndAllocations' and Recipe = 'Finbourne-Examples/Recipe' and RuleScope = 'PMS' and RunScope = @@ComplianceRunScope limit 1; @breakdown = use Lusid.ComplianceRuleResult.Breakdown with @@ComplianceRunScope, @@ComplianceRunCode --runScope={@@ComplianceRunScope} --runCode={@@ComplianceRunCode} enduse; select * from @breakdown; ``` ### Example 3: Retrieve additional lineage and property details By default, the `Lusid.ComplianceRuleResult.Breakdown` table of results only includes the first 6 lineage stages and 6 `ResultsUsed`/`PropertiesUsed` keys. In this example, we specify the `maxLineageDepth` and `maxDynamicColumns` options to see more: ```sql @@RunScope = select 'PMS'; @@RunCode = select 'bbbcfccd-d773-4a30-b478-d5bb9e34363e'; @breakdown = use Lusid.ComplianceRuleResult.Breakdown with @@RunScope, @@RunCode --runScope={@@RunScope} --runCode={@@RunCode} --maxLineageDepth=10 --maxDynamicColumns=10 enduse; select * from @breakdown; ``` For bitemporal data, the **asAt** timestamp reflects the point in time at which a data item is saved into LUSID. This allows data to be extracted from LUSID as it was at a point in the past, regardless of any subsequent updates or corrections. It is determined internally by LUSID and cannot be updated by the user.