az datashare dataset

Commands for providers to manage datashare datasets.

Commands

az datashare dataset create

Create a dataset.

az datashare dataset delete

Delete a dataset in a share.

az datashare dataset list

List datasets in a share.

az datashare dataset show

Show a dataset.

az datashare dataset wait

Place the CLI in a waiting state until a condition of the datashare dataset is met.

az datashare dataset create

Create a dataset.

az datashare dataset create --account-name
                            --dataset
                            --name
                            --resource-group
                            --share-name

Examples

Create a Blob dataset

az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare --dataset "{\"kind\":\"Blob\",\"properties\":{\"containerName\":\"C1\",\"filePath\":\"file21\",\"resourceGroup\": \"SampleResourceGroup\",\"storageAccountName\":\"storage2\",\"subscriptionId\":\"00000000-0000-0000-0000-000000000000\"}}"

Create a BlobFolder dataset

az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare --dataset "{\"kind\":\"BlobFolder\",\"properties\":{\"containerName\":\"C1\",\"prefix\":\"folder21\",\"resourceGroup\": \"SampleResourceGroup\",\"storageAccountName\":\"storage2\",\"subscriptionId\":\"00000000-0000-0000-0000-000000000000\"}}"

Create a KustoCluster dataset

az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare --dataset "{\"kind\":\"KustoCluster\",\"properties\":{\"kustoClusterResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1\"}}"

Create a KustoDatabase dataset

az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare --dataset "{\"kind\":\"KustoDatabase\",\"properties\":{\"kustoDatabaseResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1/databases/Database1\"}}"

Create a SqlDBTable dataset

az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare --dataset "{\"kind\":\"SqlDBTable\",\"properties\":{\"databaseName\":\"MySqlDB\",\"schemaName\":\"dbo\", \"sqlServerResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Sql/servers/Server1\", \"tableName\":\"Table1\"}}"

Create a SqlDWTable dataset

az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare --dataset "{\"kind\":\"SqlDWTable\",\"properties\":{\"dataWarehouseName\":\"MyDataWarehouse\",\"schemaName\":\"dbo\", \"sqlServerResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/servers/MyServer\",\"tableName\":\"MyTable\"}}"

Required Parameters

--account-name

The name of the share account.

--dataset

Dataset parameters in JSON string or path to JSON file.

--name -n

The name of the dataset.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--share-name

The name of the share.

az datashare dataset delete

Delete a dataset in a share.

az datashare dataset delete --account-name
                            --name
                            --resource-group
                            --share-name
                            [--no-wait]
                            [--yes]

Examples

Delete a dataset

az datashare dataset delete --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare

Required Parameters

--account-name

The name of the share account.

--name -n

The name of the dataset.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--share-name

The name of the share.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--yes -y

Do not prompt for confirmation.

az datashare dataset list

List datasets in a share.

az datashare dataset list --account-name
                          --resource-group
                          --share-name

Examples

List datasets

az datashare dataset list --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare

Required Parameters

--account-name

The name of the share account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--share-name

The name of the share.

az datashare dataset show

Show a dataset.

az datashare dataset show --account-name
                          --name
                          --resource-group
                          --share-name

Examples

Show a dataset

az datashare dataset show --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare

Required Parameters

--account-name

The name of the share account.

--name -n

The name of the dataset.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--share-name

The name of the share.

az datashare dataset wait

Place the CLI in a waiting state until a condition of the datashare dataset is met.

az datashare dataset wait --account-name
                          --name
                          --resource-group
                          --share-name
                          [--created]
                          [--custom]
                          [--deleted]
                          [--exists]
                          [--interval]
                          [--timeout]
                          [--updated]

Examples

Pause executing next line of CLI script until the datashare dataset is successfully provisioned.

az datashare dataset wait --account-name MyAccount --share-name MyShare --name MyDataset --resource-group MyResourceGroup --created

Required Parameters

--account-name

The name of the share account.

--name -n

The name of the dataset.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--share-name

The name of the share.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.