--- title: "Tools.Describe" slug: "toolsdescribe" tags: ["luminesce ", "provider"] updated: 2024-08-21T14:04:39Z published: 2024-08-21T14:04:39Z canonical: "support.lusid.com/toolsdescribe" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Tools.Describe | **Type** | **Read/write** | **Author** | **Availability** | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | Finbourne | Provided with LUSID | The `Tools.Describe` provider enables you to write a [Luminesce query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that provides the column names and corresponding data types for a given table of data. > [!NOTE] > **Note:** The LUSID user running the query must have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users) to use this provider. This should automatically be the case if you are the domain owner. You can use this provider in conjunction with other providers to retrieve a description of their column names and data types, [see examples 2](/v1/docs/toolsdescribe#example-2-return-column-names-and-data-types-for-a-provider) and [3](/v1/docs/toolsdescribe#example-3-return-column-names-and-data-types-from-a-csv-file-in-drive). ## Basic usage ```sql @data = select * from ; select * from Tools.Describe where ToDescribe = @data; ``` ## Query parameters `Tools.Describe` has parameters that enable you to filter or refine a query. > [!NOTE] > **Note:** The `ToDescribe` parameter is mandatory. To list available parameters, their data types, default values, and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Tools.Describe' and FieldType = 'Parameter'; ``` ## Data fields By default, `Tools.Describe` returns a table of data populated with particular fields (columns). You can return just a subset of these fields if you wish. 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](/v1/docs/what-tools-are-available-to-write-luminesce-queries): > [!NOTE] > **Note:** Fields marked 'primary key' are returned by queries that start `select ^ from Tools.Describe...` ```sql select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Tools.Describe' and FieldType = 'Column'; ``` ## Examples ### Example 1: Return column names and data types for a table of data ```sql @data = select 'x' as SomeText, 12 as SomeNumber, #2023-03-12# as SomeDate; select * from Tools.Describe where ToDescribe = @data ``` The table of data returned by the query looks like this: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/c6ddfb62-4ada-4631-88c0-1dcf424454cb.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A00%3A26Z&se=2026-11-04T03%3A00%3A26Z&sr=c&sp=r&sig=oTncFpyOsEx5hWHi73rKDRtOtl18eFFIO09OGk7Z7%2B4%3D) ### Example 2: Return column names and data types for a provider ```sql @data = select * from Lusid.Portfolio.Holding limit 1; select * from Tools.Describe where ToDescribe = @data ``` The table of data returned by the query looks like this: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/3bd75f14-3c33-49b3-99b9-9cd9e8f6b59d.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A00%3A26Z&se=2026-11-04T03%3A00%3A26Z&sr=c&sp=r&sig=oTncFpyOsEx5hWHi73rKDRtOtl18eFFIO09OGk7Z7%2B4%3D) Note this example is intended to show how the `Tools.Describe` provider works. The `Sys.Field` provider can alternatively be used to achieve the same result more efficiently. ### Example 3: Return column names and data types from a CSV file in Drive In this example, the [Drive.Csv](/v1/docs/drivecsv) provider is used to extract and create a table of data from a CSV file in Drive. `Tools.Describe` is then used to retrieve any column names and their corresponding data types from the table of data. ```sql @x = use Drive.Csv --file=/trade-files/eod.csv enduse; select * from Tools.Describe where ToDescribe = @x; ```