Type | Read/write | Author | Availability |
---|---|---|---|
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.
See also: Lusid.Property.Definition.Writer
Basic usage
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:
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:
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
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.
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
.
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
:
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
:
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.
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 to decorate transaction properties with associated property type details, such as Lifetime
: