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 international banks, investment firms, pension companies and so on.

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.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 first N legal entities

You can retrieve the name, description and internal LUID for the first 20 legal entities stored in LUSID:

select * from Lusid.LegalEntity Limit 20;

Example 2: Retrieve details for particular legal entities

You can retrieve details for particular legal entities by specifying their inlined identifier key fields. In this example, all the legal entities with identifier keys represented by the IntBankIdInvestFirmId and PenCoId fields are retrieved. Note that legal entities without these identifier keys are omitted:

select LusidEntityId, 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 whose attributes match particular character strings:

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