Skip to main content

tables

Creates, updates, deletes, gets or lists a tables resource.

Overview

Nametables
TypeResource
Idazure.log_analytics.tables

Fields

The following fields are returned by SELECT queries:

OK response definition.

NameDatatypeDescription
propertiesobjectTable's properties.
systemDataobjectMetadata pertaining to creation and last modification of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, workspaceName, tableNameGets a Log Analytics workspace table.
list_by_workspaceselectsubscriptionId, resourceGroupName, workspaceNameGets all the tables for the specified Log Analytics workspace.
create_or_updateinsertsubscriptionId, resourceGroupName, workspaceName, tableNameUpdate or Create a Log Analytics workspace table.
updateupdatesubscriptionId, resourceGroupName, workspaceName, tableNameUpdate a Log Analytics workspace table.
deletedeletesubscriptionId, resourceGroupName, workspaceName, tableNameDelete a Log Analytics workspace table.
migrateexecsubscriptionId, resourceGroupName, workspaceName, tableNameMigrate a Log Analytics table from support of the Data Collector API and Custom Fields features to support of Data Collection Rule-based Custom Logs.
cancel_searchexecsubscriptionId, resourceGroupName, workspaceName, tableNameCancel a log analytics workspace search results table query run.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
tableNamestringThe name of the table.
workspaceNamestringThe name of the workspace.

SELECT examples

Gets a Log Analytics workspace table.

SELECT
properties,
systemData
FROM azure.log_analytics.tables
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND tableName = '{{ tableName }}' -- required
;

INSERT examples

Update or Create a Log Analytics workspace table.

INSERT INTO azure.log_analytics.tables (
data__properties,
subscriptionId,
resourceGroupName,
workspaceName,
tableName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ workspaceName }}',
'{{ tableName }}'
RETURNING
properties,
systemData
;

UPDATE examples

Update a Log Analytics workspace table.

UPDATE azure.log_analytics.tables
SET
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND tableName = '{{ tableName }}' --required
RETURNING
properties,
systemData;

DELETE examples

Delete a Log Analytics workspace table.

DELETE FROM azure.log_analytics.tables
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND tableName = '{{ tableName }}' --required
;

Lifecycle Methods

Migrate a Log Analytics table from support of the Data Collector API and Custom Fields features to support of Data Collection Rule-based Custom Logs.

EXEC azure.log_analytics.tables.migrate 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@workspaceName='{{ workspaceName }}' --required,
@tableName='{{ tableName }}' --required
;