Lusid.Property.Definition

Type

Read/write

Author

Availability

Data provider

Read

Finbourne

Provided with LUSID

The Lusid.Property.Definition provider enables you to write a Luminesce SQL query that retrieves property types stored in LUSID. These include all the property types and derived property types you create yourself, and a selection of property types underlying system properties and valuation metrics provided with LUSID.

Note: The LUSID user running the query must have sufficient access control permissions to both use the provider and read property type data in LUSID. This should automatically be the case if you are the domain owner.

See also: Lusid.Property.Definition.Writer

Basic usage

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:

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:

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.

Example 1: Retrieve all property types, custom and system

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.

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

Example 3: Retrieve just derived property types

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

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

Example 4: 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.

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

Example 5: 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 to decorate transaction properties with associated property type details, such as Lifetime:

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');