Skip to main content

tables

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

Overview

Nametables
TypeResource
Idazure.storage.tables

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
accountNametextfield from the properties object
resourceGroupNametextfield from the properties object
signed_identifierstextfield from the properties object
subscriptionIdtextfield from the properties object
tableNametextfield from the properties object
table_nametextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, resourceGroupName, subscriptionId, tableNameGets the table with the specified table name, under the specified account if it exists.
listSELECTaccountName, resourceGroupName, subscriptionIdGets a list of all the tables under the specified storage account
createINSERTaccountName, resourceGroupName, subscriptionId, tableNameCreates a new table with the specified table name, under the specified account.
deleteDELETEaccountName, resourceGroupName, subscriptionId, tableNameDeletes the table with the specified table name, under the specified account if it exists.
updateUPDATEaccountName, resourceGroupName, subscriptionId, tableNameCreates a new table with the specified table name, under the specified account.

SELECT examples

Gets a list of all the tables under the specified storage account

SELECT
id,
name,
accountName,
resourceGroupName,
signed_identifiers,
subscriptionId,
tableName,
table_name,
type
FROM azure.storage.vw_tables
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new tables resource.

/*+ create */
INSERT INTO azure.storage.tables (
accountName,
resourceGroupName,
subscriptionId,
tableName,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tableName }}',
'{{ properties }}'
;

UPDATE example

Updates a tables resource.

/*+ update */
UPDATE azure.storage.tables
SET
properties = '{{ properties }}'
WHERE
accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';

DELETE example

Deletes the specified tables resource.

/*+ delete */
DELETE FROM azure.storage.tables
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tableName = '{{ tableName }}';