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
Copy file name to clipboardExpand all lines: articles/iot-central/core/howto-export-to-azure-data-explorer.md
+47-47Lines changed: 47 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to use the IoT Central data export capability to continuo
4
4
services: iot-central
5
5
author: dominicbetts
6
6
ms.author: dobett
7
-
ms.date: 05/22/2023
7
+
ms.date: 03/05/2024
8
8
ms.topic: how-to
9
9
ms.service: iot-central
10
10
---
@@ -35,29 +35,42 @@ Azure Data Explorer destinations let you configure the connection with a *servic
35
35
36
36
### Create an Azure Data Explorer destination
37
37
38
-
# [Service principal](#tab/service-principal)
38
+
# [Managed identity](#tab/managed-identity)
39
39
40
-
If you don't have an existing Azure Data Explorer database to export to, follow these steps:
40
+
This article shows how to create a managed identity using the Azure CLI. You can also use the Azure portal to create a managed identity.
41
41
42
-
1. You have two choices to create an Azure Data Explorer database:
42
+
If you don't have an existing Azure Data Explorer database to export to, follow these steps. You have two choices to create an Azure Data Explorer database:
43
43
44
-
- Create a new Azure Data Explorer cluster and database. To learn more, see the [Azure Data Explorer quickstart](/azure/data-explorer/create-cluster-database-portal). Make a note of the cluster URI and the name of the database you create, you need these values in the following steps.
45
-
- Create a new Azure Synapse Data Explorer pool and database. To learn more, see the [Azure Data Explorer quickstart](../../synapse-analytics/get-started-analyze-data-explorer.md). Make a note of the pool URI and the name of the database you create, you need these values in the following steps.
44
+
- Create a new Azure Data Explorer cluster and database. To learn more, see the [Azure Data Explorer quickstart](/azure/data-explorer/create-cluster-database-portal). Make a note of the cluster URI and the name of the database you create, you need these values in the following steps.
45
+
- Create a new Azure Synapse Data Explorer pool and database. To learn more, see the [Azure Data Explorer quickstart](../../synapse-analytics/get-started-analyze-data-explorer.md). Make a note of the pool URI and the name of the database you create, you need these values in the following steps.
46
46
47
-
1. Create a service principal that you can use to connect your IoT Central application to Azure Data Explorer. Use the Azure Cloud Shell to run the following command:
47
+
To configure the managed identity that enables your IoT Central application to securely export data to your Azure resource:
48
+
49
+
1. Create a managed identity for your IoT Central application to use to connect to your database. Use the Azure Cloud Shell to run the following command:
48
50
49
51
```azurecli
50
-
az ad sp create-for-rbac --skip-assignment --name "My SP for IoT Central" --scopes /subscriptions/<SubscriptionId>
52
+
az iot central app identity assign --name {your IoT Central app name} \
53
+
--resource-group {resource group name} \
54
+
--system-assigned
51
55
```
52
56
53
-
Make a note of the `appId`, `password`, and `tenant` values in the command output, you need them in the following steps.
57
+
Make a note of the `principalId` and `tenantId` output by the command. You use these values in the following step.
54
58
55
-
1. To add the service principal to the database, navigate to the Azure Data Explorer portal and run the following query on your database. Replace the placeholders with the values you made a note of previously:
59
+
1. Configure the database permissions to allow connections from your IoT Central application. Use the Azure Cloud Shell to run the following command:
az kusto database-principal-assignment create --cluster-name {name of your cluster} \
63
+
--database-name {name of your database} \
64
+
--resource-group {resource group name} \
65
+
--principal-assignment-name {name of your IoT Central application} \
66
+
--principal-id {principal id from the previous step} \
67
+
--principal-type App --role Admin \
68
+
--tenant-id {tenant id from the previous step}
59
69
```
60
70
71
+
> [!TIP]
72
+
> If you're using Azure Synapse, see [`az synapse kusto database-principal-assignment`](/cli/azure/synapse/kusto/database-principal-assignment).
73
+
61
74
1. Create a table in your database with a suitable schema for the data you're exporting. The following example query creates a table called `smartvitalspatch`. To learn more, see [Transform data inside your IoT Central application for export](howto-transform-data-internally.md):
62
75
63
76
```kusto
@@ -90,55 +103,38 @@ To create the Azure Data Explorer destination in IoT Central on the **Data expor
90
103
91
104
1. Select **Azure Data Explorer** as the destination type.
92
105
93
-
1. Enter your Azure Data Explorer cluster or pool URL, database name, and table name. The following table shows the service principal values to use for the authorization:
94
-
95
-
| Service principal value | Destination configuration |
1. Enter your Azure Data Explorer cluster or pool URL, database name, and table name. Select **System-assigned managed identity** as the authorization type.
100
107
101
108
> [!TIP]
102
109
> The cluster URL for a standalone Azure Data Explorer looks like `https://<ClusterName>.<AzureRegion>.kusto.windows.net`. The cluster URL for an Azure Synapse Data Explorer pool looks like `https://<DataExplorerPoolName>.<SynapseWorkspaceName>.kusto.azuresynapse.net`.
103
110
104
-
:::image type="content" source="media/howto-export-data/export-destination.png" alt-text="Screenshot of Azure Data Explorer export destination that uses a service principal.":::
111
+
:::image type="content" source="media/howto-export-data/export-destination-managed.png" alt-text="Screenshot of Azure Data Explorer export destination that uses a managed identity.":::
105
112
106
-
# [Managed identity](#tab/managed-identity)
113
+
If you don't see data arriving in your destination service, see [Troubleshoot issues with data exports from your Azure IoT Central application](troubleshooting.md).
107
114
108
-
This article shows how to create a managed identity using the Azure CLI. You can also use the Azure portal to create a managed identity.
115
+
# [Service principal](#tab/service-principal)
109
116
110
-
If you don't have an existing Azure Data Explorer database to export to, follow these steps. You have two choices to create an Azure Data Explorer database:
117
+
If you don't have an existing Azure Data Explorer database to export to, follow these steps:
111
118
112
-
- Create a new Azure Data Explorer cluster and database. To learn more, see the [Azure Data Explorer quickstart](/azure/data-explorer/create-cluster-database-portal). Make a note of the cluster URI and the name of the database you create, you need these values in the following steps.
113
-
- Create a new Azure Synapse Data Explorer pool and database. To learn more, see the [Azure Data Explorer quickstart](../../synapse-analytics/get-started-analyze-data-explorer.md). Make a note of the pool URI and the name of the database you create, you need these values in the following steps.
119
+
1. You have two choices to create an Azure Data Explorer database:
114
120
115
-
To configure the managed identity that enables your IoT Central application to securely export data to your Azure resource:
121
+
- Create a new Azure Data Explorer cluster and database. To learn more, see the [Azure Data Explorer quickstart](/azure/data-explorer/create-cluster-database-portal). Make a note of the cluster URI and the name of the database you create, you need these values in the following steps.
122
+
- Create a new Azure Synapse Data Explorer pool and database. To learn more, see the [Azure Data Explorer quickstart](../../synapse-analytics/get-started-analyze-data-explorer.md). Make a note of the pool URI and the name of the database you create, you need these values in the following steps.
116
123
117
-
1. Create a managed identity for your IoT Central application to use to connect to your database. Use the Azure Cloud Shell to run the following command:
124
+
1. Create a service principal that you can use to connect your IoT Central application to Azure Data Explorer. Use the Azure Cloud Shell to run the following command:
118
125
119
126
```azurecli
120
-
az iot central app identity assign --name {your IoT Central app name} \
121
-
--resource-group {resource group name} \
122
-
--system-assigned
127
+
az ad sp create-for-rbac --skip-assignment --name "My SP for IoT Central" --scopes /subscriptions/<SubscriptionId>
123
128
```
124
129
125
-
Make a note of the `principalId` and `tenantId` output by the command. You use these values in the following step.
130
+
Make a note of the `appId`, `password`, and `tenant` values in the command output, you need them in the following steps.
126
131
127
-
1. Configure the database permissions to allow connections from your IoT Central application. Use the Azure Cloud Shell to run the following command:
132
+
1. To add the service principal to the database, navigate to the Azure Data Explorer portal and run the following query on your database. Replace the placeholders with the values you made a note of previously:
128
133
129
-
```azurecli
130
-
az kusto database-principal-assignment create --cluster-name {name of your cluster} \
131
-
--database-name {name of your database} \
132
-
--resource-group {resource group name} \
133
-
--principal-assignment-name {name of your IoT Central application} \
134
-
--principal-id {principal id from the previous step} \
> If you're using Azure Synapse, see [`az synapse kusto database-principal-assignment`](/cli/azure/synapse/kusto/database-principal-assignment).
141
-
142
138
1. Create a table in your database with a suitable schema for the data you're exporting. The following example query creates a table called `smartvitalspatch`. To learn more, see [Transform data inside your IoT Central application for export](howto-transform-data-internally.md):
143
139
144
140
```kusto
@@ -171,14 +167,18 @@ To create the Azure Data Explorer destination in IoT Central on the **Data expor
171
167
172
168
1. Select **Azure Data Explorer** as the destination type.
173
169
174
-
1. Enter your Azure Data Explorer cluster or pool URL, database name, and table name. Select **System-assigned managed identity** as the authorization type.
170
+
1. Enter your Azure Data Explorer cluster or pool URL, database name, and table name. The following table shows the service principal values to use for the authorization:
171
+
172
+
| Service principal value | Destination configuration |
> The cluster URL for a standalone Azure Data Explorer looks like `https://<ClusterName>.<AzureRegion>.kusto.windows.net`. The cluster URL for an Azure Synapse Data Explorer pool looks like `https://<DataExplorerPoolName>.<SynapseWorkspaceName>.kusto.azuresynapse.net`.
178
180
179
-
:::image type="content" source="media/howto-export-data/export-destination-managed.png" alt-text="Screenshot of Azure Data Explorer export destination that uses a managed identity.":::
180
-
181
-
If you don't see data arriving in your destination service, see [Troubleshoot issues with data exports from your Azure IoT Central application](troubleshooting.md).
181
+
:::image type="content" source="media/howto-export-data/export-destination.png" alt-text="Screenshot of Azure Data Explorer export destination that uses a service principal.":::
Copy file name to clipboardExpand all lines: articles/iot-central/core/howto-export-to-blob-storage.md
+35-35Lines changed: 35 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to use the IoT Central data export capability to continuo
4
4
services: iot-central
5
5
author: dominicbetts
6
6
ms.author: dobett
7
-
ms.date: 05/22/2023
7
+
ms.date: 03/05/2024
8
8
ms.topic: how-to
9
9
ms.service: iot-central
10
10
ms.custom: devx-track-azurecli
@@ -38,25 +38,39 @@ Blob Storage destinations let you configure the connection with a *connection st
38
38
39
39
### Create an Azure Blob Storage destination
40
40
41
-
# [Connection string](#tab/connection-string)
41
+
# [Managed identity](#tab/managed-identity)
42
42
43
+
This article shows how to create a managed identity using the Azure CLI. You can also use the Azure portal to create a manged identity.
43
44
44
-
If you don't have an existing Azure storage account to export to, run the following script in the Azure Cloud Shell bash environment. The script creates a resource group, Azure Storage account, and blob container. It then prints the connection string to use when you configure the data export in IoT Central:
45
+
If you don't have an existing Azure storage account to export to, run the following script in the Azure Cloud Shell bash environment. The script creates a resource group, Azure Storage account, and blob container. The script then enables the managed identity for your IoT Central application and assigns the role it needs to access your storage account:
45
46
46
47
```azurecli-interactive
47
-
# Replace the storage account name with your own unique value
48
+
# Replace the storage account name with your own unique value.
48
49
SA=yourstorageaccount$RANDOM
50
+
51
+
# Replace the IoT Central app name with the name of your
You can learn more about creating new [Azure Blob Storage accounts](../../storage/blobs/storage-quickstart-blobs-portal.md) or [Azure Data Lake Storage v2 storage accounts](../../storage/common/storage-account-create.md). Data export can only write data to storage accounts that support block blobs. The following table shows the known compatible storage account types:
@@ -68,51 +82,41 @@ You can learn more about creating new [Azure Blob Storage accounts](../../storag
68
82
|Standard|Blob storage|
69
83
|Premium|Block Blob storage|
70
84
85
+
To further secure your blob container and only allow access from trusted services with managed identities, see [Export data to a secure destination on an Azure Virtual Network](howto-connect-secure-vnet.md).
86
+
71
87
To create the Blob Storage destination in IoT Central on the **Data export** page:
72
88
73
89
1. Select **+ New destination**.
74
90
75
91
1. Select **Azure Blob Storage** as the destination type.
76
92
77
-
1. Select **Connection string** as the authorization type.
93
+
1. Select **System-assigned managed identity** as the authorization type.
78
94
79
-
1.Paste in the connection string for your Blob Storage resource, and enter the case-sensitive container name if necessary.
95
+
1.Enter the endpoint URI for your storage account and the case-sensitive container name. An endpoint URI looks like: `https://contosowaste.blob.core.windows.net`.
80
96
81
97
1. Select **Save**.
82
98
83
-
# [Managed identity](#tab/managed-identity)
99
+
If you don't see data arriving in your destination service, see [Troubleshoot issues with data exports from your Azure IoT Central application](troubleshooting.md).
84
100
85
-
This article shows how to create a managed identity using the Azure CLI. You can also use the Azure portal to create a manged identity.
101
+
# [Connection string](#tab/connection-string)
86
102
87
-
If you don't have an existing Azure storage account to export to, run the following script in the Azure Cloud Shell bash environment. The script creates a resource group, Azure Storage account, and blob container. The script then enables the managed identity for your IoT Central application and assigns the role it needs to access your storage account:
103
+
104
+
If you don't have an existing Azure storage account to export to, run the following script in the Azure Cloud Shell bash environment. The script creates a resource group, Azure Storage account, and blob container. It then prints the connection string to use when you configure the data export in IoT Central:
88
105
89
106
```azurecli-interactive
90
-
# Replace the storage account name with your own unique value.
107
+
# Replace the storage account name with your own unique value
91
108
SA=yourstorageaccount$RANDOM
92
-
93
-
# Replace the IoT Central app name with the name of your
You can learn more about creating new [Azure Blob Storage accounts](../../storage/blobs/storage-quickstart-blobs-portal.md) or [Azure Data Lake Storage v2 storage accounts](../../storage/common/storage-account-create.md). Data export can only write data to storage accounts that support block blobs. The following table shows the known compatible storage account types:
@@ -124,22 +128,18 @@ You can learn more about creating new [Azure Blob Storage accounts](../../storag
124
128
|Standard|Blob storage|
125
129
|Premium|Block Blob storage|
126
130
127
-
To further secure your blob container and only allow access from trusted services with managed identities, see [Export data to a secure destination on an Azure Virtual Network](howto-connect-secure-vnet.md).
128
-
129
131
To create the Blob Storage destination in IoT Central on the **Data export** page:
130
132
131
133
1. Select **+ New destination**.
132
134
133
135
1. Select **Azure Blob Storage** as the destination type.
134
136
135
-
1. Select **System-assigned managed identity** as the authorization type.
137
+
1. Select **Connection string** as the authorization type.
136
138
137
-
1.Enter the endpoint URI for your storage account and the case-sensitive container name. An endpoint URI looks like: `https://contosowaste.blob.core.windows.net`.
139
+
1.Paste in the connection string for your Blob Storage resource, and enter the case-sensitive container name if necessary.
138
140
139
141
1. Select **Save**.
140
142
141
-
If you don't see data arriving in your destination service, see [Troubleshoot issues with data exports from your Azure IoT Central application](troubleshooting.md).
0 commit comments