Skip to content

Commit 70d5bf2

Browse files
committed
Add feedback
1 parent c1b7cf0 commit 70d5bf2

File tree

1 file changed

+34
-40
lines changed

1 file changed

+34
-40
lines changed

articles/iot-operations/connect-to-cloud/howto-configure-data-lake.md

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ authentication:
225225
226226
Configure the data lake connector to send data to an Azure Data Explorer endpoint using managed identity.
227227
228-
1. To deploy an Azure Data Explorer cluster, follow the **Full cluster** steps in the [Quickstart: Create an Azure Data Explorer cluster and database](/azure/data-explorer/create-cluster-database-portal&tabs=full).
228+
1. To deploy an Azure Data Explorer cluster, follow the **Full cluster** steps in the [Quickstart: Create an Azure Data Explorer cluster and database](/azure/data-explorer/create-cluster-and-database&tabs=full).
229229
230-
1. To deploy an Azure Data Explorer cluster, follow the **Full cluster** steps in the [Quickstart: Create an Azure Data Explorer cluster and database](/azure/data-explorer/create-cluster-database-portal).
230+
1. To deploy an Azure Data Explorer cluster, follow the **Full cluster** steps in the [Quickstart: Create an Azure Data Explorer cluster and database](/azure/data-explorer/create-cluster-database-portal&tabs=full).
231231
232232
1. After the cluster is created, create a database to store your data.
233233
@@ -248,22 +248,17 @@ Configure the data lake connector to send data to an Azure Data Explorer endpoin
248248
249249
### Enable streaming ingestion
250250
251-
Enable streaming ingestion on your table and database. In the query tab, run the following command, substituting `<TABLE_NAME>` and `<DATABASE_NAME>` with your table and database names:
251+
Enable streaming ingestion on your table and database. In the query tab, run the following command, substituting `<DATABASE_NAME>` with your database name:
252252
253253
```kql
254-
.alter table <TABLE_NAME> policy streamingingestion enable
255254
.alter database <DATABASE_NAME> policy streamingingestion enable
256255
```
257256
258257
For example:
259258
260259
```kql
261-
.alter table thermostat policy streamingingestion enable
262260
.alter database TestDatabase policy streamingingestion enable
263261
```
264-
### Deploy ARC extension
265-
266-
Deploy the broker as an ARC extension so that you get managed identity support. Follow the steps outlined in [Quickstart: Deploy Azure IoT Operations Preview to an Arc-enabled Kubernetes cluster](../get-started/quickstart-deploy.md).
267262
268263
### Add the managed identity to the Azure Data Explorer cluster
269264
@@ -292,15 +287,22 @@ spec:
292287
repository: edgebuilds.azurecr.io/datalake
293288
tag: edge
294289
pullPolicy: Always
295-
instances: 1
296-
logLevel: "debug"
290+
repository: mcr.microsoft.com/azureiotoperations/datalake
291+
tag: 0.4.0-preview
297292
databaseFormat: "adx"
298293
target:
299294
endpoint: https://<cluster>.<region>.kusto.windows.net
300295
# TODO: insert the ADX cluster endpoint formatted as <cluster>.<region>.kusto.windows.net
301296
endpoint: "<endpoint>"
302297
authentication:
303298
localBrokerConnection:
299+
endpoint: aio-mq-dmqtt-frontend:8883
300+
tls:
301+
tlsEnabled: true
302+
trustedCaCertificateConfigMap: aio-ca-trust-bundle-test-only
303+
authentication:
304+
kubernetes: {}
305+
---
304306
endpoint: aio-mq-dmqtt-frontend:8883
305307
tls:
306308
tlsEnabled: true
@@ -317,31 +319,31 @@ metadata:
317319
namespace: azure-iot-operations
318320
spec:
319321
dataLakeConnectorRef: "my-datalake-connector"
320-
mapping:
321-
allowedLatencySecs: 1
322-
messagePayloadType: "json"
323-
maxMessagesPerBatch: 10
324-
clientId: id
325-
mqttSourceTopic: "dlc"
326-
qos: 1
327-
table:
328-
# TODO: add db and table name
329-
tablePath: "<db>"
330-
tableName: "thermostat"
331322
schema:
332-
- name: "externalAssetId"
323+
- name: externalAssetId
333324
format: utf8
334325
optional: false
335-
mapping: "data.externalAssetId"
336-
- name: "assetName"
326+
mapping: $property.externalAssetId
327+
- name: assetName
337328
format: utf8
338329
optional: false
339-
mapping: "data.assetName"
340-
- name: "currentTemperature"
330+
mapping: DataSetWriterName
331+
- name: CurrentTemperature
332+
format: float32
333+
optional: false
334+
mapping: Payload.temperature.Value
335+
- name: Pressure
341336
format: float32
337+
optional: true
338+
mapping: "Payload.Tag 10.Value"
339+
- name: MqttTopic
340+
format: utf8
342341
optional: false
343-
mapping: "$data.currentTemperature"
344-
- name: "pressure"
342+
mapping: $topic
343+
- name: Timestamp
344+
format: timestamp
345+
optional: false
346+
mapping: $received_time
345347
format: float32
346348
optional: false
347349
mapping: "$data.pressure"
@@ -370,16 +372,7 @@ This example accepts data from the `dlc` topic with messages in JSON format such
370372
}
371373
```
372374

373-
Example command to send data to Azure Data Explorer:
374375

375-
```bash
376-
mosquitto_pub -t dlc -q 1 -r -V 5 -d -i "orderClient" \
377-
-h 10.0.0.4 \
378-
-m '{"data": {"externalAssetID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "assetName": "thermostat-de", "currentTemperature": 5506, "pressure": 5506}}' \
379-
--repeat 10 \
380-
--repeat-delay 0 \
381-
-c
382-
```
383376

384377
## DataLakeConnector
385378

@@ -438,9 +431,8 @@ The specification field of a DataLakeConnectorTopicMap resource contains the fol
438431
- `name`: The name of the column in the Delta table.
439432
- `format`: The data type of the column in the Delta table. It can be one of `boolean`, `int8`, `int16`, `int32`, `int64`, `uInt8`, `uInt16`, `uInt32`, `uInt64`, `float16`, `float32`, `float64`, `date32`, `timestamp`, `binary`, or `utf8`. Unsigned types, like `uInt8`, aren't fully supported, and are treated as signed types if specified here.
440433
- `optional`: A boolean value that indicates whether the column is optional or required. This field is optional and defaults to false.
441-
- `mapping`: JSON path expression that defines how to extract the value of the column from the MQTT message payload. Built-in mappings `$client_id`, `$topic`, `$properties`, `$topicSegment`, and `$received_time` are available to use as columns to enrich the JSON in MQTT message body. This field is required.
434+
- `mapping`: JSON path expression that defines how to extract the value of the column from the MQTT message payload. Built-in mappings `$client_id`, `$topic`, `$properties`, and `$received_time` are available to use as columns to enrich the JSON in MQTT message body. This field is required.
442435
Use $properties for MQTT user properties. For example, $properties.assetId represents the value of the assetId property from the MQTT message.
443-
Use $topicSegment to identify the segment of the topic that you want to extract. For example, if the topic is `devices/+/messages/events`, you can do $topicSegment.1 to get the first segment. The segment index is 1-based.
444436

445437
Here's an example of a *DataLakeConnectorTopicMap* resource:
446438
@@ -484,7 +476,9 @@ spec:
484476
mapping: $received_time
485477
```
486478
487-
Stringified JSON like `"{\"SequenceNumber\": 4697, \"Timestamp\": \"2024-04-02T22:36:03.1827681Z\", \"DataSetWriterName\": \"thermostat-de\", \"MessageType\": \"ua-deltaframe\", \"Payload\": {\"temperature\": {\"SourceTimestamp\": \"2024-04-02T22:36:02.6949717Z\", \"Value\": 5506}, \"Tag 10\": {\"SourceTimestamp\": \"2024-04-02T22:36:02.6949888Z\", \"Value\": 5506}}}"` isn't supported and causes the connector to throw a *convertor found a null value* error. An example message for the `dlc` topic that works with this schema:
479+
Stringified JSON like `"{\"SequenceNumber\": 4697, \"Timestamp\": \"2024-04-02T22:36:03.1827681Z\", \"DataSetWriterName\": \"thermostat-de\", \"MessageType\": \"ua-deltaframe\", \"Payload\": {\"temperature\": {\"SourceTimestamp\": \"2024-04-02T22:36:02.6949717Z\", \"Value\": 5506}, \"Tag 10\": {\"SourceTimestamp\": \"2024-04-02T22:36:02.6949888Z\", \"Value\": 5506}}}"` isn't supported and causes the connector to throw a *convertor found a null value* error.
480+
481+
An example message for the `dlc` topic that works with this schema:
488482

489483
```json
490484
{

0 commit comments

Comments
 (0)