You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,13 +22,13 @@ In this tutorial, you'll learn how to:
22
22
## Prerequisites
23
23
24
24
* Azure Subscription: If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
25
-
* Your recipient's Azure login e-mail address (using their e-mail alias won't work).
25
+
* Your recipient's Azure e-mail address (using their e-mail alias won't work).
26
26
* If the source Azure data store is in a different Azure subscription than the one you will use to create Data Share resource, register the [Microsoft.DataShare resource provider](concepts-roles-permissions.md#resource-provider-registration) in the subscription where the Azure data store is located.
27
27
28
28
### Share from a storage account
29
29
30
30
* An Azure Storage account: If you don't already have one, you can create an [Azure Storage account](../storage/common/storage-account-create.md)
31
-
* Permission to write to the storage account, which is present in *Microsoft.Storage/storageAccounts/write*. This permission exists in the **Contributor** role.
31
+
* Permission to write to the storage account, which is present in *Microsoft.Storage/storageAccounts/write*. This permission exists in the **Storage Blob Data Contributor** role.
32
32
* Permission to add role assignment to the storage account, which is present in *Microsoft.Authorization/role assignments/write*. This permission exists in the **Owner** role.
33
33
34
34
@@ -42,9 +42,9 @@ Below is the list of prerequisites for sharing data from SQL source.
42
42
***Azure Active Directory Admin** of the SQL server
43
43
* SQL Server Firewall access. This can be done through the following steps:
44
44
1. In Azure portal, navigate to SQL server. Select *Firewalls and virtual networks* from left navigation.
45
-
1.Click**Yes** for *Allow Azure services and resources to access this server*.
46
-
1.Click**+Add client IP**. Client IP address is subject to change. This process might need to be repeated the next time you are sharing SQL data from Azure portal. You can also add an IP range.
47
-
1.Click**Save**.
45
+
1.Select**Yes** for *Allow Azure services and resources to access this server*.
46
+
1.Select**+Add client IP**. Client IP address is subject to change. This process might need to be repeated the next time you are sharing SQL data from Azure portal. You can also add an IP range.
47
+
1.Select**Save**.
48
48
49
49
#### Prerequisites for sharing from Azure Synapse Analytics (workspace) SQL pool
50
50
@@ -59,13 +59,13 @@ Below is the list of prerequisites for sharing data from SQL source.
59
59
create user "<share_acct_name>"from external provider;
Note that the*<share_acc_name>* is the name of your Data Share resource. If you have not created a Data Share resource as yet, you can come back to this pre-requisite later.
62
+
The*<share_acc_name>* is the name of your Data Share resource. If you have not created a Data Share resource as yet, you can come back to this pre-requisite later.
63
63
64
64
* Synapse workspace Firewall access. This can be done through the following steps:
65
65
1. In Azure portal, navigate to Synapse workspace. Select*Firewalls*from left navigation.
66
-
1. Click**ON** for *Allow Azure services and resources to access this workspace*.
67
-
1. Click**+Add client IP**. Client IP address is subject to change. This process might need to be repeated the next time you are sharing SQL data from Azure portal. You can also add an IP range.
68
-
1. Click**Save**.
66
+
1. Select**ON** for *Allow Azure services and resources to access this workspace*.
67
+
1. Select**+Add client IP**. Client IP address is subject to change. This process might need to be repeated the next time you are sharing SQL data from Azure portal. You can also add an IP range.
68
+
1. Select**Save**.
69
69
70
70
71
71
### Share from Azure Data Explorer
@@ -142,6 +142,48 @@ Use these commands to create the resource:
142
142
az datashare account list --resource-group testresourcegroup
143
143
```
144
144
145
+
### [PowerShell](#tab/powershell)
146
+
147
+
Create an Azure Data Share resource in an Azure resource group.
148
+
149
+
Start by preparing your environment for PowerShell. You can either run PowerShell commands locally or using the Bash environment in the Azure Cloud Shell.
[](https://shell.azure.com)
154
+
155
+
Use these commands to create the resource:
156
+
157
+
1. Use the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) command to connect to your Azure account.
158
+
159
+
```azurepowershell
160
+
Connect-AzAccount
161
+
```
162
+
163
+
1. Run the [Set-AzContext](/powershell/module/az.accounts/set-azcontext) command to set the correct subscription, if you have multiple subscriptions.
164
+
165
+
```azurepowershell
166
+
Set-AzContext [SubscriptionID/SubscriptionName]
167
+
```
168
+
169
+
1. Run the [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) command to create a resource group, or use an existing resource group:
Run the [Get-AzDataShareAccount](/powershell/module/az.datashare/get-azdatashareaccount) command to see your Data Share accounts:
182
+
183
+
```azurecli
184
+
Get-AzDataShareAccount
185
+
```
186
+
145
187
---
146
188
147
189
## Create a share
@@ -192,13 +234,13 @@ Use these commands to create the resource:
192
234
193
235
### [Azure CLI](#tab/azure-cli)
194
236
195
-
1. Run the [az storage account create](/cli/azure/storage/account#az_storage_account_create) command to create a Data Share:
237
+
1. Run the [az storage account create](/cli/azure/storage/account#az_storage_account_create) command to create a Storage account for this Data Share:
196
238
197
239
```azurecli
198
240
az storage account create --resource-group testresourcegroup --name ContosoMarketplaceAccount
199
241
```
200
242
201
-
1. Use the [az storage container create](/cli/azure/storage/container#az_storage_container_create) command to create a container for the share in the previous command:
243
+
1. Use the [az storage container create](/cli/azure/storage/container#az_storage_container_create) command to create a container inside the storage account created in the previous command:
202
244
203
245
```azurecli
204
246
az storage container create --name ContosoMarketplaceContainer --account-name ContosoMarketplaceAccount
@@ -220,6 +262,53 @@ Use these commands to create the resource:
1. If you do not already have data you would like to share, you can follow these steps to create a storage account. If you already have storage, you may skip to step 2.
268
+
269
+
1. Run the [New-AzStorageAccount](/powershell/module/az.storage/new-azstorageaccount) command to create an Azure Storage account:
1. Run the [New-AzStorageContainer](/powershell/module/az.storage/new-azstoragecontainer) command to create a container in your new Azure Storage account that will hold your data:
1. Run the [Set-AzStorageBlobContent](/powershell/module/az.storage/new-azstoragecontainer) command to upload a file. The follow example uploads _textfile.csv_from the _D:\testFiles_ folder on local memory, to the container you created.
For more information about working with Azure Storage in PowerShell, follow this [Azure Storage PowerShell guide](../storage/blobs/storage-quickstart-blobs-powershell.md).
292
+
293
+
294
+
1. Run the [New-AzDataShare](/powershell/module/az.datashare/new-azdatashare) command to create your Data Share:
1. Use the [New-AzDataShareInvitation](/powershell/module/az.datashare/get-azdatasharereceivedinvitation) command to create the invitation for the specified address:
1. Use the [New-AzDataShareSynchronizationSetting](/powershell/module/az.datashare/new-azdatasharesynchronizationsetting) command to set a synchronization recurrence for your share. This can be daily, hourly, or at a particular time.
Your Azure Data Share has now been created and the recipient of your Data Share is now ready to accept your invitation.
@@ -230,7 +319,7 @@ When the resource is no longer needed, go to the **Data Share Overview** page an
230
319
231
320
## Next steps
232
321
233
-
In this tutorial, you learnt how to create an Azure Data Share and invite recipients. To learn about how a Data Consumer can accept and receive a data share, continue to the accept and receive data tutorial.
322
+
In this tutorial, you learned how to create an Azure Data Share and invite recipients. To learn about how a Data Consumer can accept and receive a data share, continue to the accept and receive data tutorial.
234
323
235
324
> [!div class="nextstepaction"]
236
325
> [Tutorial: Accept and receive data using Azure Data Share](subscribe-to-data-share.md)
0 commit comments