Views:
TypeRead/writeAuthorAvailability
Data providerReadFinbourneProvided with LUSID

The Lusid.Portfolio provider enables you to write a Luminesce SQL query that retrieve information about one or more portfolios.

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

See also: Lusid.Portfolio.WriterLusid.PortfolioGroup

Basic usage

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

Query parameters

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

Data fields

By default, Lusid.Portfolio returns a table of data populated with particular fields (columns). You can return a subset of these fields.

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' and FieldType = 'Column';


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

Examples

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

Example 1: Retrieve the first ten portfolios

select * from Lusid.Portfolio limit 10

Example 2: Retrieve all transaction portfolios in a particular scope with a particular base currency

Allowed values for the PortfolioType field are Transaction, DerivedTransaction and Reference.

select * from Lusid.Portfolio where PortfolioScope = 'Finbourne-Examples' and PortfolioType = 'Transaction' and BaseCurrency = 'GBP'

Example 3: Retrieve all the derived transaction portfolios with a particular parent

select * from Lusid.Portfolio where PortfolioType = 'DerivedTransaction' and ParentPortfolioScope = 'Finbourne-Examples' and ParentPortfolioCode = 'UK-Equities'