Lusid.Portfolio

Type

Read/write

Author

Availability

Data provider

Read

Finbourne

Provided with LUSID

Providing you have sufficient access control permissions, the Lusid.Portfolio provider enables you to write a Luminesce SQL query that retrieve information about one or more portfolios. Note this is not the transactions or constituents that the portfolio contains, but rather metadata such as scope, code, base currency and so on.

Note: By default, Lusid.Portfolio cannot retrieve properties. To do this, you must first configure Lusid.Portfolio to 'inline' properties. See how to do this..

See also: Lusid.Portfolio.Writer

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

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

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

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

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

select * from Lusid.Portfolio limit 10
SQL

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'
SQL
select * from Lusid.Portfolio where PortfolioType = 'DerivedTransaction' and ParentPortfolioScope = 'Finbourne-Examples' and ParentPortfolioCode = 'UK-Equities'
SQL
select
  AsAtCreated, 
  RequestIdCreated, 
  AsAtModified, 
  UserIdModified, 
  RequestIdModified, 
  AsAtVersionNumber 
from Lusid.Portfolio
where UserIdCreated = '00uji4twb4jDcHGjN2p7'  
SQL