Muokkaa

Jaa


.create-merge tables command

Applies to: ✅ Microsoft FabricAzure Data Explorer

Lets you create and extend the schemas of existing tables in a single bulk operation, in the context of a specific database.

Permissions

This command requires Database User permissions, and Table Admin permissions for extending existing tables.

Syntax

.create-merge tables tableName1 (columnName:columnType [, ...]) [, tableName2 (columnName:columnType [, ...]) ... ] [with (propertyName = propertyValue [, ...])]

Learn more about syntax conventions.

Parameters

Name Type Required Description
tableName string ✔️ The name of the table to create or extend.
columnName, columnType string ✔️ The name of an existing or new column mapped to the type of data in that column. The list of mappings defines the output column schema.
propertyName, propertyValue string A comma-separated list of key-value property pairs. See supported properties.

Supported properties

Name Type Description
docstring string Free text describing the entity to be added. This string is presented in various UX settings next to the entity names.
folder string The name of the folder to add to the table.

Returns

  • Specified tables that don't exist will be created.
  • Specified tables that already exist will have their schemas extended.
    • Nonexistent columns are added at the end of the existing table's schema.
    • Existing columns that aren't specified in the command won't be removed from the existing table's schema.
    • Existing columns that are specified with a data type in the command that is different from the one in the existing table's schemas lead to a failure. No tables are created.

Example

.create-merge tables 
  MyLogs (Level:string, Timestamp:datetime, UserId:string, TraceId:string, Message:string, ProcessId:int32),
  MyUsers (UserId:string, Name:string)

Output

tableName DatabaseName Folder DocString
MyLogs TopComparison
MyUsers TopComparison