Views:
TypeRead/writeAuthorAvailability
Data providerReadFinbourneProvided with LUSID

The Lusid.Person provider enables you to write a Luminesce SQL query that retrieves details about person entities stored in LUSID, such as portfolio managers, traders and so on.

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

See also: Lusid.Person.Writer

Prerequisites

Note: You only need perform the operation in this section once, for both Lusid.Person and Lusid.Person.Writer.

A person entity must have at least one user-specified identifier from which LUSID can generate a unique internal LUID. Consider the following JSON representation of a person entity in LUSID:

"displayName": "John Doe",
"description": "A portfolio manager in US investments",
"lusidPersonId": "LUID_00003D6X",
"identifiers": {
  "Person/PortfolioManagers/ManagerId": {
     "key": "Person/PortfolioManagers/ManagerId",
     "value": {
       "labelValue": "PortMan1"
     },
     "effectiveFrom": "0001-01-01T00:00:00.0000000+00:00"
   }
}

It's important to note that Lusid.Person does not know anything about the Person/PortfolioManagers/ManagerId identifier out-of-the-box. For this reason, a field representing this identifier cannot be listed in the Luminesce catalog by default. In order to retrieve person entities, you must first run a special SQL query to 'inline' the identifier as a field in Lusid.Person, so that it appears in the catalog and can be interacted with:

@identifiersToCatalog = values
('Person/PortfolioManagers/ManagerId', 'PortManId', True, 'An identifier for this person as a portfolio manager');

@config = select column1 as [Key], column2 as Name, column3 as IsMain, column4 as Description from @identifiersToCatalog;

select * from Sys.Admin.Lusid.Provider.Configure
where Provider = 'Lusid.Person'
and Configuration = @config;

You can now use Lusid.Person in the normal way to retrieve person fields, including the newly-added identifier field (which is listed in the catalog as PortManId).

Basic usage

select * from Lusid.Person where <filter-expression>

Query parameters

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

Data fields

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

Note: Fields marked 'main' are returned by queries that select a caret character, for example select ^ from Lusid.Person.

Examples

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

Example 1: Retrieve the first 20 people

select * from Lusid.Person Limit 20;

Example 2: Retrieve all people with particular names and descriptions

select * from Lusid.Person where DisplayName like 'John%' and Description like '%trader%';