Create an empty table

Tables are named entities that hold data. A table has an ordered set of columns, and zero or more rows of data. Each row holds one data value for each of the columns of the table. The order of rows in the table is unknown, and doesn't in general affect queries, except for some tabular operators (such as the top operator) that are inherently undetermined.

You can create an empty table without a data source to use as a testing environment, or for ingesting data in a later stage. In this article, you learn how to create an empty table within the context of a KQL database.

Prerequisites

Create an empty table in your KQL database

  1. Browse to your desired KQL database.

  2. Select +New > Table.

    Screenshot of lower ribbon that shows the dropdown menu of the New button in Real-Time Intelligence. The dropdown option titled Table is highlighted.

  3. Enter a name for your table.

    Screenshot of the Destination tab in the new table wizard in Real-Time Intelligence. The table name is highlighted.

    Note

    Table names can be up to 1024 characters including alphanumeric, hyphens, and underscores. Special characters aren't supported.

  4. Select Next: Source.

Source

  1. By default, the Source type is set to None. If you select None, you can manually define the table schema.
  2. Select Next: Schema.

Screenshot of the Source tab that shows that the source type is set to None in the new table wizard in Real-Time Intelligence.

Schema

The tool automatically infers the schema based on your data. To create a schema without a data source, you need to add columns under Partial data preview.

Command viewer

The command viewer shows the commands for creating tables, mapping, and ingesting data in tables.

To open the command viewer, select the v button on the right side of the command viewer. In the command viewer, you can view and copy the automatic commands generated from your inputs.

Screenshot of the Command viewer. The Expand button is highlighted.

Partial data preview

The partial data preview is automatically inferred based on your data.

To add a new column, select Add new column under Partial data preview.

Screenshot of the Schema tab in the new table wizard in Real-Time Intelligence. The Add new column button is highlighted.

Edit columns
  1. Enter a column name. The column name should start with a letter, and can contain numbers, periods, hyphens, or underscores.

  2. Select a data type for your column. The default column type is string but can be altered in the dropdown menu of the Column type field.

  3. Select Add column to add more columns.

  4. Select Save to add the columns to your table.

    Screenshot of  the Edit columns window showing filled column names and their data type in the new table wizard in Real-Time Intelligence.

    The Partial data preview reflects the added columns:

    Screenshot of Schema tab showing the added columns under the Partial data preview. The column names are highlighted.

    Note

    Optionally, you can edit existing columns and add new columns by selecting Edit columns or the + button on the right-hand column under Partial data preview.

  5. Select Next: Summary to create the table mapping.

Summary tab

In the Create table completed window, the empty table is marked with a green check mark to indicate that it was created successfully.

Screenshot of the Summary tab that shows that the table was created successfully in Real-Time Intelligence.