.show databases entities command
Applies to: ✅ Azure Data Explorer
The following command shows databases' entities, such as tables, materialized views, external tables, etc.
Permissions
You must have at least Database User, Database Viewer, or Database Monitor permissions to run these commands. For more information, see role-based access control.
Syntax
.show
databases
entities
[with
(
Options)
]
Supported options
Key | Value | Description |
---|---|---|
showObfuscatedStrings |
bool |
Defaults to false . If true , obfuscated strings in database entity bodies are shown. To use this option, you must either be a database admin or entity creator. If you don't have these permissions, the obfuscated strings are not shown. |
resolveFunctionsSchema |
bool |
Defaults to false . If true , returned stored functions have output schema resolved. |
Returns
Returns a list of entities of all cluster databases visible to the user. Database entities are: tables, materialized views, external tables, etc.
Important
By default, all databases' entites are returned. To make the command execution more optimal, add a where
condition that filters by specific databases and/or entity types or names (see examples section in this article).
Returns
Output parameter | Type | Description |
---|---|---|
DatabaseName | string |
Name of the database where the entity is defined. |
EntityType | string |
One of Table , MaterialiedView , ExternalTable , Function , or EntityGroup . |
EntityName | string |
The name of the entity. |
DocString | string |
Entity documentation, if exists. |
Folder | string |
Folder name under which the entity is located. |
CslInputSchema | string |
Entity input schema in CSL schema format, if applicable. For functions, the schema is for the function parameters. |
Content | string |
Entity content, if applicable. For functions, it's a body of the function. |
CslOutputSchema | string |
Entity output schema in CSL schema format. |
Properties | dynamic |
Dynamic structure that provides more details on the entity (currently unused.) |
Examples
Show databases entities
The following example returns a list of entities from the TestDB
database with obfuscated strings shown.
.show databases entities with (showObfuscatedStrings=true)
| where DatabaseName == "TestDB"
Output
DatabaseName | EntityType | EntityName | DocString | Folder | CslInputSchema | Content | CslOutputSchema | Properties |
---|---|---|---|---|---|---|---|---|
TestDB | Table | GeoIP | Table containing Geolocation info per IP network | My tables | ['network']:string, locale_code:string, continent_code:string, continent_name:string, country_iso_code:string,country_name:string | {} | ||
TestDB | MaterializedView | MV1 | My first materialized view | a:long, b:string, c:long | {} | |||
TestDB | Function | MeaningLessFn | My first function | Functions | (T:(s:string,a:long,b:long), k:long) | {T | extend substring(s, a, b) | take k} | {} |
Resolving functions schema
The following example uses the .show databases entities
command with the function schema resolved to return information about the MeaningLessFn function in the TestDB
database. The output includes function schema.
.show databases entities with (resolveFunctionsSchema=true)
| where DatabaseName == "TestDB" and EntityType == "Function" and EntityName == "MeaningLessFn"
Output
DatabaseName | EntityType | EntityName | DocString | Folder | CslInputSchema | Content | CslOutputSchema | Properties |
---|---|---|---|---|---|---|---|---|
TestDB | Function | MeaningLessFn | My first function | Functions | (T:(s:string,a:long,b:long), k:long) | {T | extend substring(s, a, b) | take k} | s:string, a:long, b:long, Column1:string | {} |