---
title: "Lusid.Property.Definition"
slug: "lusidpropertydefinition"
updated: 2025-02-12T16:54:50Z
published: 2025-02-12T16:54:50Z
canonical: "support.lusid.com/lusidpropertydefinition"
---

> ## 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.Property.Definition

| **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.Property.Definition` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that retrieves property types stored in LUSID.

These include all the [property types](/v1/docs/how-do-i-create-a-property-type) and [derived property types](/v1/docs/how-do-i-create-a-derived-property-type) you create yourself, and a selection of property types underlying [system properties](/v1/docs/what-is-a-system-property) and [valuation metrics](/v1/docs/valuing-a-multi-asset-multi-region-portfolio#deciding-which-metrics-to-report) provided with LUSID.

**See also:** [Lusid.Property.Definition.Writer](/v1/docs/lusidpropertydefinitionwriter)

## Basic usage

```sql
select * from Lusid.Property.Definition where <filter-expression>;
```

## Query parameters

`Lusid.Property.Definition` 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.Property.Definition' and FieldType = 'Parameter';
```

## Data fields

By default, `Lusid.Property.Definition` returns a table of data populated with particular fields (columns). You can return just a subset of these fields if you wish.

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.Property.Definition' and FieldType = 'Column';
```

> **Note:** Fields marked 'main' are returned by queries that use a caret character, for example `select ^ from Lusid.Property.Definition`.

## Examples

> **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples).

### Example 1: Retrieve all property types, custom and system

```sql
select * from Lusid.Property.Definition;
```

### Example 2: Retrieve all user-defined property types

You can exclude property types for system properties, valuation metrics and potentially other settings provided with LUSID by filtering out the protected `system` and `default` scopes.

```sql
select * from Lusid.Property.Definition where PropertyScope not in ('system', 'default');
```

### Example 3: Retrieve all derived property types

You can retrieve just derived property types by filtering out the protected `system` and `default` scopes and setting `isDerived` to `True`.

```sql
select * from Lusid.Property.Definition where PropertyScope not in ('system', 'default') and isDerived = True;
```

### Example 4: Retrieve all dependent property types in the derivation formulae of derived property types

A derived property type has a derivation formula that may reference other property types. The following query retrieves dependent property types for all derived property types in a particular domain, in this case `Instrument`:

```sql
select DISTINCT
  substr(sRow.Value, 1, instr(sRow.Value, ']') - 1) as propertyKey
  ,def.PropertyKey as DerivedPropertyKey
from
  Lusid.Property.Definition def
left outer join
  Tools.Split sRow on def.DerivationFormula = sRow.Original and sRow.DelimiterString = 'Properties['
left outer join
  Lusid.Property.Definition prop on prop.propertyKey = substr(sRow.Value, 1, instr(sRow.Value, ']') - 1)
where
  def.domain = 'Instrument' and
  def.IsDerived = true and
  def.PropertyScope not in ('LUSID-Onboarding','default','system') and
  def.[ConstraintStyle] not in ('Identifier') and
  instr(sRow.Value, ']') > 0
```

The query generates one row per dependency per derived property type. So for example if an `Instrument/Derived/Domicile` derived property type has the following derivation formula:

`map(coalesce(Properties[Instrument/SourceA/country_issue], Properties[Instrument/SourceB/origin], 'Unknown'): 'United Kingdom'='UK', 'united kingdom'='UK', 'United States'='USA', 'US'='USA', default='Unknown')`

…then the query produces the following two rows for `Instrument/Derived/Domicile`:

![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(513).png)

### Example 5: Retrieve property types for multiple property scopes

You can retrieve property types for a particular set of property scopes, such as those used by your data vendors.

```sql
select * from Lusid.Property.Definition where PropertyScope in ('VendorA', 'VendorB', 'VendorC');
```

### Example 6: Retrieve property types for all transactions within a portfolio scope

You can join `Lusid.Property.Definition` to a property provider such as [Lusid.Portfolio.Txn.Property](/v1/docs/lusidportfoliotxnproperty) to decorate transaction properties with associated property type details, such as `Lifetime`:

```sql
select
    tp.TxnId,
    tp.PortfolioScope,
    tp.Value,
    pd.PropertyScope,
    pd.PropertyCode,
    pd.DisplayName,
    pd.Description,
    pd.DataType,
    pd.PropertyKey,
    pd.Lifetime
from Lusid.Property.Definition pd
inner join Lusid.Portfolio.Txn.Property tp
    on tp.PropertyScope = pd.PropertyScope and tp.PropertyCode = pd.PropertyCode 
where tp.PortfolioScope = 'Finbourne-Examples' and pd.PropertyScope not in ('system', 'default');
```
