Type | Read/write | Author | Availability |
Read | Finbourne | Provided with LUSID |
The Sys.File
provider enables you to write a Luminesce SQL query that retrieves information on files stored in the Luminesce file system.
Note: The LUSID user running the query must have sufficient access control permissions to both use the provider and read Luminesce file system data. This should automatically be the case if you are the domain owner.
See also: Sys.File.History
Basic usage
select * from Sys.File where <filter-expression>;
Query parameters
Sys.File
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 = 'Sys.File' and FieldType = 'Parameter';
Data fields
By default, Sys.File
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 = 'Sys.File' and FieldType = 'Column';
Note: Fields marked 'main' are returned by queries that include a caret character, for example
select ^ from Sys.File
.
Examples
Note: For more example Luminesce SQL queries, visit our Github repo.
Example 1: Retrieve first 10 files from the Luminesce file system
select * from Sys.File limit 10
Example 2: Retrieve inline properties for a particular provider
In this example, Sys.File
is used to retrieve user configuration changes (’inline’ properties) to Lusid.LegalEntity.
select Content from Sys.File where Name = 'legalentityproviderfactory'
The results include information such as the data type of the ‘inline’ properties.
Example 3: Retrieve inline properties for all LUSID providers
select Name, Content from Sys.File where Name like '%providerfactory'