Views:
TypeRead/writeAuthorAvailability
Data providerReadFinbourneProvided with LUSID

The Lusid.LegalEntity provider enables you to write a Luminesce SQL query that retrieves details about legal entities defined in LUSID, such as records for international banks, investment firms, pension companies, and so on. These are used for defining relationships between legal entities, persons, portfolios, and portfolio groups. See Lusid.Relationship.

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

See also: Luisd.LegalEntity.WriterLusid.Relationship.Writer

Basic usage

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

Query parameters

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

Data fields

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

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

Examples

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

Example 1: Retrieve the details of the first twenty legal entities

You can retrieve the name, description, and internal LUID for legal entities held in LUSID, but only for the first n records.

select * from Lusid.LegalEntity Limit 20;

Example 2: Retrieve the LUIDs for particular legal entity identifiers

You can retrieve the internal legal entity LUIDs and their associated display names for a set of legal entity identifiers, such as those for international banks, investment firms, pension companies, and so on.

select LusidEntityId, DisplayName, IntBankId, InvestFirmId, PenCoId from Lusid.LegalEntity;

Example 3: Retrieve all legal entities that have particular name and description attributes

You can retrieve the name, description, and internal LUID for legal entities held in LUSID whose attributes match particular character strings:

select * from Lusid.LegalEntity where DisplayName like '%Asset%' and Description like '%City%';