Inspect Table Schema then Query
A 3-step recipe with Azure Log Analytics. We can help you get access.
Recipe · 3 steps
Inspect Table Schema then Query
with Azure Log Analytics
Enumerate workspace tables, read one table's schema, then query it.
- List every table in the workspace so the target table can be confirmed before inspecting its schema.
- Read the management definition of the chosen table to expose its column schema, plan, and retention settings.
- Execute the KQL query against the workspace, targeting the inspected table, and return the tabular results.
What you'll need to have ready
- subscriptionId: The ID of the target Azure subscription.
- resourceGroupName: The resource group that contains the workspace.
- workspaceName: The management name of the Log Analytics workspace.
- tableName: The name of the table to inspect and query (e.g. AzureActivity).
- workspaceId: The customer (workspace) GUID used by the query endpoint.
- query: The KQL query to run against the table.
- timespan: Optional ISO 8601 duration limiting the query window (e.g. P1D).
- managementApiVersion: The management API version to use.
For your developer
Arazzo workflow azure-log-analytics:list-tables-then-query, 3 operations: listTables → getTable → postQuery. Specs on APIs.io.