az datashare consumer dataset-mapping

Commands for consumers to manage datashare dataset mappings.

Commands

az datashare consumer dataset-mapping create

Create a dataSet mapping.

az datashare consumer dataset-mapping delete

Delete a dataset mapping in a share subscription.

az datashare consumer dataset-mapping list

List dataset mappings in a share subscription.

az datashare consumer dataset-mapping show

Show a dataset mapping in a share subscription.

az datashare consumer dataset-mapping create

Create a dataSet mapping.

az datashare consumer dataset-mapping create --account-name
                                             --mapping
                                             --name
                                             --resource-group
                                             --share-subscription-name

Examples

Create a Blob dataset mapping

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

Create a BlobFolder dataset mapping

az datashare consumer dataset-mapping create --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --mapping "{\"kind\":\"BlobFolder\",\"properties\":{\"containerName\":\"C2\",\"dataSetId\":\"00000000-0000-0000-0000-000000000000\",\"prefix\":\"folder21\",\"resourceGroup\":\"SampleResourceGroup\",\"storageAccountName\":\"storage3\",\"subscriptionId\":\"00000000-0000-0000-0000-000000000000\"}}"

Create a SqlDBTable dataset mapping

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

Create a AdlsGen2File dataset mapping

az datashare consumer dataset-mapping create --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --mapping "{\"kind\":\"AdlsGen2File\",\"properties\":{\"dataSetId\":\"00000000-0000-0000-0000-000000000000\",\"filePath\":\"file21\",\"fileSystem\": \"fileSystem\",\"outputType\":\"Csv\",\"resourceGroup\":\"SampleResourceGroup\",\"storageAccountName\":\"storage2\",\"subscriptionId\":\"00000000-0000-0000-0000-000000000000\"}}"

Create a SqlDWTable dataset mapping

az datashare consumer dataset-mapping create --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --mapping "{\"kind\":\"SqlDWTable\",\"properties\":{\"dataSetId\":\"00000000-0000-0000-0000-000000000000\",\"dataWarehouseName\":\"DataWarehouse1\",\"schemaName\":\"dbo\",\"sqlServerResourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Sql/servers/Server1\",\"tableName\":\"Table1\"}}"

Required Parameters

--account-name

The name of the share account.

--mapping

Dataset mapping in JSON string or path to JSON file.

--name -n

The name of the datasetMapping.

--resource-group -g

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

--share-subscription-name

The name of the share subscription.

az datashare consumer dataset-mapping delete

Delete a dataset mapping in a share subscription.

az datashare consumer dataset-mapping delete --account-name
                                             --name
                                             --resource-group
                                             --share-subscription-name
                                             [--yes]

Examples

Delete a dataset mapping

az datashare consumer dataset-mapping delete --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription

Required Parameters

--account-name

The name of the share account.

--name -n

The name of the datasetMapping.

--resource-group -g

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

--share-subscription-name

The name of the share subscription.

Optional Parameters

--yes -y

Do not prompt for confirmation.

az datashare consumer dataset-mapping list

List dataset mappings in a share subscription.

az datashare consumer dataset-mapping list --account-name
                                           --resource-group
                                           --share-subscription-name

Examples

List dataset mappings

az datashare consumer dataset-mapping list --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription

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-subscription-name

The name of the share subscription.

az datashare consumer dataset-mapping show

Show a dataset mapping in a share subscription.

az datashare consumer dataset-mapping show --account-name
                                           --name
                                           --resource-group
                                           --share-subscription-name

Examples

Show a dataset mapping

az datashare consumer dataset-mapping show --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription

Required Parameters

--account-name

The name of the share account.

--name -n

The name of the datasetMapping.

--resource-group -g

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

--share-subscription-name

The name of the share subscription.