Lusid.Portfolio.Txn.Property

Type

Read/write

Author

Availability

Data provider

Read

Finbourne

Provided with LUSID

The Lusid.Portfolio.Txn.Property provider enables you to write a Luminesce SQL query that retrieves custom properties for transactions in LUSID.

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

See also: Lusid.Portfolio.Txn, Lusid.Portfolio.Txn.Property.Writer

Basic usage

select * from Lusid.Portfolio.Txn.Property where <filter-expression>;

Query parameters

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

Data fields

By default, Lusid.Portfolio.Txn.Property 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.Portfolio.Txn.Property' and FieldType = 'Column';

Note: Fields marked 'main' are returned by queries that start select ^ from Lusid.Portfolio.Txn.Property...

Examples

Note: For more example Luminesce SQL queries, visit our Github repo.

Example 1: Retrieve custom properties for transactions across all portfolios

select * from Lusid.Portfolio.Txn.Property

Example 2: Retrieve transactions that have a particular property and property value

You can select a particular property value for your filter expression, for example the NYSE exchange code.

select * from Lusid.Portfolio.Txn.Property where PropertyCode = 'ExCo' and Value = 'NYSE'

Example 3: Retrieve transactions that have a particular property value, and display transaction details

You can join Lusid.Portfolio.Txn.Property to an entity provider such as Lusid.Portfolio.Txn to retrieve transaction details, such as TradePrice, TradeAmount and so on, though only for a particular transaction property.

select
    t.TxnId,
    t.LusidInstrumentId as 'Lusid Instrument ID',
    t.TradePrice,
    t.TradeAmount,
    t.TradeCurrency,
    tp.PortfolioScope,
    tp.PortfolioCode,
    tp.Value as 'Exchange Code'
from Lusid.Portfolio.Txn.Property tp
inner join Lusid.Portfolio.Txn t
    on t.TxnId = tp.TxnId
where tp.PortfolioScope = 'Finbourne-Examples' and tp.PropertyCode = 'ExCo'