Edit

Add or delete tables and columns in Azure Monitor Logs

This article explains how to create a custom table by using an example data collection rule (DCR) and how to manage table schemas with custom columns.

Data collection rules (DCRs) control how Azure Monitor collects data. They let you filter and transform log data before it reaches an Azure or custom table.

Custom columns extend the schema of a table to accommodate changes in the data source or your organization's analysis requirements. When you update a table schema, update any DCRs that send data to that table.

Prerequisites

Action Permission required
Manage a table Microsoft.OperationalInsights/workspaces/* permission at the Log Analytics workspace scope or higher.
For example, as provided by the privileged built-in role, Log Analytics contributor.

To ingest data into the table, you might need the following items:

  • Data collection endpoint (DCE). For more information, see DCE.
  • A sample of at least one record of the source data in a JSON file. Use this sample to create custom tables in the portal, such as when you collect text and JSON data sources from VMs.

Consider these additional requirements:

  • All tables in a Log Analytics workspace must have a TimeGenerated column, which identifies the ingestion time of the record. If the column is missing, Azure Monitor automatically adds it to the transformation in your DCR for the table. For more information, see supported datetime formats.
  • Auxiliary / Lake table plans only support the TimeGenerated column in the ISO 8601 format with six decimal places for precision (microseconds). For more information, see supported ISO 8601 datetime format.

Create a custom table

Azure tables have predefined schemas. To store log data in a different schema, use data collection rules to define how to collect, transform, and send the data to a custom table in your Log Analytics workspace. When you create a custom table, choose a table plan (Analytics (default), Basic, or Auxiliary / Lake) based on your data usage and cost requirements.

Custom tables have a suffix of _CL; for example, tablename_CL. The Azure portal adds the _CL suffix to the table name automatically. When you create a custom table by using a different method, you need to add the _CL suffix yourself. The tablename_CL in the DataFlows Streams properties in your data collection rules must match the tablename_CL name in the Log Analytics workspace.

Warning

Azure uses table names for billing, so don't include sensitive information in the name.

To create a custom table by using the Azure portal:

  1. From the Log Analytics workspaces menu, select Tables.

  2. Select Create.

  3. Enter a name and, optionally, a description for the table. You don't need to add the _CL suffix to the custom table's name. The portal adds the suffix automatically to the name you specify.

  4. Under Table plan, select Analytics (default), Basic, or Auxiliary / Lake.

  5. Select an existing data collection rule from the Data collection rule dropdown, or select Create a new data collection rule and specify the Subscription, Resource group, and Name for the new data collection rule.

    Screenshot showing new data collection rule.

  6. Select a data collection endpoint and select Next. If you selected a DCR that's already associated with a DCE, this dropdown is unavailable.

  7. Select Browse for files and locate the JSON file with the sample data for your new table. The following screenshot uses a sample JSON file from the script in the Tutorial: Send data to Azure Monitor Logs.

    Screenshot showing custom log browse for files.

    If your sample data doesn't include a TimeGenerated column, you receive a message that the portal creates a transformation with this column.

  8. If you want to transform log data before ingestion into your table:

    1. Select Transformation editor.

      The transformation editor lets you create a transformation for the incoming data stream. The transformation is a Kusto Query Language (KQL) query that runs against each incoming record. Azure Monitor Logs stores the results of the query in the destination table.

      Screenshot showing custom log data preview.

    2. Select Run to view the results.

      Screenshot showing initial custom log data query.

  9. Select Apply to save the transformation and view the schema of the new table. Select Next.

    Screenshot showing custom log final schema.

  10. Verify the final details and select Create to save the custom log.

    Screenshot showing custom log create.

Variable Example value Purpose
host management.azure.com Implicit Azure Resource Manager endpoint
subscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e User input
resourceGroupName myResourceGroup User input
workspaceName myWorkspace User input
tableName_CL myTable_CL User input
plan Auxiliary Valid values: Analytics (default), Basic, Auxiliary. See table plans.
apiVersion 2025-07-01 Reference

Delete a table

You can't delete Azure tables. How Azure removes data when you delete any other table depends on the table type.

For more information, see What happens to data when you delete a table in a Log Analytics workspace.

To delete a table from the Azure portal:

  1. From the Log Analytics workspace menu, select Tables.

  2. Search for the tables you want to delete by name, or by selecting Search results in the Type field.

    Screenshot that shows the Tables screen for a Log Analytics workspace with the Filter by name and Type fields highlighted.

  3. Select the table you want to delete, select the ellipsis ( ... ) to the right of the table, select Delete, and confirm the deletion by typing yes.

    Screenshot that shows the Delete Table screen for a table in a Log Analytics workspace.

Variable Example value Purpose
host management.azure.com Implicit Azure Resource Manager endpoint
subscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e User input
resourceGroupName myResourceGroup User input
workspaceName myWorkspace User input
tableName_CL myTable_CL User input
apiVersion 2025-07-01 Reference

Add or delete a custom column

Custom tables let you modify the schema by adding or deleting columns after you create the table. In Azure tables, you can only add and delete custom columns.

Important

Whenever you update a table schema, be sure to update any data collection rules that send data to the table. The table schema you define in your data collection rule determines how Azure Monitor streams data to the destination table. Azure Monitor doesn't update data collection rules automatically when you make table schema changes.

Use these rules when defining column names for custom tables:

  • Column names must start with a letter (A-Z or a-z).
  • After the first character, use only letters, digits, or underscores.
  • Don't use spaces, dots, dashes, or other punctuation in column names.
  • Non-ASCII letters (for example, Æ, É, Ö) aren't supported in column names.
  • Column names are only case sensitive for Analytics and Basic tables. Auxiliary log table ingestion drops data with duplicate column names when the only difference is case.
  • Column names must be 2 to 45 characters long.
  • Custom column names in Azure tables must end in _CF.
  • The GUID type is a logical annotation, but the values are stored and queried as strings. For more information, see Column data types in Azure Monitor Logs.
  • Don't use names that conflict with system or reserved columns, including id, BilledSize, IsBillable, InvalidTimeGenerated, TenantId, Title, Type, UniqueId, _ItemId, _ResourceGroup, _ResourceId, _SubscriptionId, _TimeReceived.

These schema rules are stricter than general Kusto identifier rules. Kusto can reference unusual property names with quoting in queries, but the custom table schema accepts only letters, digits, and underscores for column names.

To add a custom column to a table in your Log Analytics workspace, or delete a column:

  1. From the Log Analytics workspaces menu, select Tables.

  2. Select the ellipsis ( ... ) to the right of the table you want to edit and select Edit schema.

    This action opens the Schema Editor screen.

  3. Scroll down to the Custom Columns section of the Schema Editor screen.

    Screenshot showing the Schema Editor screen with the Add a column and Delete buttons highlighted.

  4. To add a new column:

    1. Select Add a column.
    2. Set the column name and description (optional), and select the expected value type from the Type dropdown.
    3. Select Save to save the new column.
  5. To delete a column, select the Delete icon to the left of the column you want to delete.

Variable Example value Purpose
host management.azure.com Implicit Azure Resource Manager endpoint
subscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e User input
resourceGroupName myResourceGroup User input
workspaceName myWorkspace User input
tableName Heartbeat User input
columnName Custom1_CF User input
apiVersion 2025-07-01 Reference