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
You can use dataflow conversions to transform data in Azure IoT Operations. The *conversion* element in a dataflow is used to compute values for output fields. You can use input fields, available operations, data types, and type conversions in dataflow conversions.
17
19
18
20
The dataflow conversion element is used to compute values for output fields:
@@ -28,7 +30,7 @@ output: 'ColorProperties.*'
28
30
expression: '($1 + $2) / 2'
29
31
```
30
32
31
-
# [Kubernetes](#tab/kubernetes)
33
+
# [Kubernetes (preview)](#tab/kubernetes)
32
34
33
35
```yaml
34
36
- inputs:
@@ -64,7 +66,7 @@ output: 'ColorProperties.*'
64
66
expression: '($1, $2, $3, $4)'
65
67
```
66
68
67
-
# [Kubernetes](#tab/kubernetes)
69
+
# [Kubernetes (preview)](#tab/kubernetes)
68
70
69
71
```yaml
70
72
- inputs:
@@ -171,7 +173,7 @@ output: 'Measurement'
171
173
expression: 'min($1)'
172
174
```
173
175
174
-
# [Kubernetes](#tab/kubernetes)
176
+
# [Kubernetes (preview)](#tab/kubernetes)
175
177
176
178
```yaml
177
179
- inputs:
@@ -196,7 +198,7 @@ output: 'Measurements'
196
198
expression: 'take($1, 10)' // taking at max 10 items
You can enrich data by using the *contextualization datasets* function. When incoming records are processed, you can query these datasets based on conditions that relate to the fields of the incoming record. This capability allows for dynamic interactions. Data from these datasets can be used to supplement information in the output fields and participate in complex calculations during the mapping process.
17
19
18
20
For example, consider the following dataset with a few records, represented as JSON records:
@@ -47,7 +49,7 @@ datasets: [
47
49
]
48
50
```
49
51
50
-
# [Kubernetes](#tab/kubernetes)
52
+
# [Kubernetes (preview)](#tab/kubernetes)
51
53
52
54
```yaml
53
55
datasets:
@@ -84,7 +86,7 @@ When a new record is being processed, the mapper performs the following steps:
Use the dataflow mapping language to transform data in Azure IoT Operations. The syntax is a simple, yet powerful, way to define mappings that transform data from one format to another. This article provides an overview of the dataflow mapping language and key concepts.
18
20
19
21
Mapping allows you to transform data from one format to another. Consider the following input record:
@@ -86,7 +88,7 @@ The following mapping is an example:
86
88
}
87
89
```
88
90
89
-
# [Kubernetes](#tab/kubernetes)
91
+
# [Kubernetes (preview)](#tab/kubernetes)
90
92
91
93
```yaml
92
94
- inputs:
@@ -131,7 +133,7 @@ inputs: [
131
133
output: 'origin_topic'
132
134
```
133
135
134
-
# [Kubernetes](#tab/kubernetes)
136
+
# [Kubernetes (preview)](#tab/kubernetes)
135
137
136
138
```yaml
137
139
inputs:
@@ -152,7 +154,7 @@ inputs: [
152
154
output: '$metadata.user_property.origin_topic'
153
155
```
154
156
155
-
# [Kubernetes](#tab/kubernetes)
157
+
# [Kubernetes (preview)](#tab/kubernetes)
156
158
157
159
```yaml
158
160
inputs:
@@ -182,7 +184,7 @@ inputs: [
182
184
]
183
185
```
184
186
185
-
# [Kubernetes](#tab/kubernetes)
187
+
# [Kubernetes (preview)](#tab/kubernetes)
186
188
187
189
```yaml
188
190
- inputs:
@@ -201,7 +203,7 @@ inputs: [
201
203
]
202
204
```
203
205
204
-
# [Kubernetes](#tab/kubernetes)
206
+
# [Kubernetes (preview)](#tab/kubernetes)
205
207
206
208
```yaml
207
209
- inputs:
@@ -220,7 +222,7 @@ inputs: [
220
222
]
221
223
```
222
224
223
-
# [Kubernetes](#tab/kubernetes)
225
+
# [Kubernetes (preview)](#tab/kubernetes)
224
226
225
227
```yaml
226
228
- inputs:
@@ -242,7 +244,7 @@ Any other characters are treated as part of the field name. This flexibility is
242
244
243
245
In Bicep, all strings are enclosed in single quotation marks (`'`). The examples about proper quoting in YAML for Kubernetes use don't apply.
244
246
245
-
# [Kubernetes](#tab/kubernetes)
247
+
# [Kubernetes (preview)](#tab/kubernetes)
246
248
247
249
The path definition must also adhere to the rules of YAML. When a character with special meaning is included in the path, proper quoting is required in the configuration. Consult the YAML documentation for precise rules. Here are some examples that demonstrate the need for careful formatting:
248
250
@@ -266,7 +268,7 @@ inputs: [
266
268
]
267
269
```
268
270
269
-
# [Kubernetes](#tab/kubernetes)
271
+
# [Kubernetes (preview)](#tab/kubernetes)
270
272
271
273
```yaml
272
274
- inputs:
@@ -291,7 +293,7 @@ In this example, the path consists of three segments: `Payload`, `Tag.10`, and `
291
293
]
292
294
```
293
295
294
-
# [Kubernetes](#tab/kubernetes)
296
+
# [Kubernetes (preview)](#tab/kubernetes)
295
297
296
298
```yaml
297
299
- inputs:
@@ -310,7 +312,7 @@ In this example, the path consists of three segments: `Payload`, `Tag.10`, and `
310
312
]
311
313
```
312
314
313
-
# [Kubernetes](#tab/kubernetes)
315
+
# [Kubernetes (preview)](#tab/kubernetes)
314
316
315
317
```yaml
316
318
- inputs:
@@ -329,7 +331,7 @@ In this example, the path consists of three segments: `Payload`, `Tag.10`, and `
329
331
]
330
332
```
331
333
332
-
# [Kubernetes](#tab/kubernetes)
334
+
# [Kubernetes (preview)](#tab/kubernetes)
333
335
334
336
```yaml
335
337
- inputs:
@@ -360,7 +362,7 @@ inputs: [
360
362
output: '*'
361
363
```
362
364
363
-
# [Kubernetes](#tab/kubernetes)
365
+
# [Kubernetes (preview)](#tab/kubernetes)
364
366
365
367
```yaml
366
368
- inputs:
@@ -419,7 +421,7 @@ Mapping configuration that uses wildcards:
419
421
}
420
422
```
421
423
422
-
# [Kubernetes](#tab/kubernetes)
424
+
# [Kubernetes (preview)](#tab/kubernetes)
423
425
424
426
```yaml
425
427
- inputs:
@@ -494,7 +496,7 @@ output: 'ColorProperties.*'
494
496
expression: '($1 + $2) / 2'
495
497
```
496
498
497
-
# [Kubernetes](#tab/kubernetes)
499
+
# [Kubernetes (preview)](#tab/kubernetes)
498
500
499
501
```yaml
500
502
- inputs:
@@ -566,7 +568,7 @@ inputs: [
566
568
]
567
569
```
568
570
569
-
# [Kubernetes](#tab/kubernetes)
571
+
# [Kubernetes (preview)](#tab/kubernetes)
570
572
571
573
```yaml
572
574
- inputs:
@@ -604,7 +606,7 @@ inputs: [
604
606
]
605
607
```
606
608
607
-
# [Kubernetes](#tab/kubernetes)
609
+
# [Kubernetes (preview)](#tab/kubernetes)
608
610
609
611
```yaml
610
612
- inputs:
@@ -645,7 +647,7 @@ When you use the previous example from multi-input wildcards, consider the follo
645
647
}
646
648
```
647
649
648
-
# [Kubernetes](#tab/kubernetes)
650
+
# [Kubernetes (preview)](#tab/kubernetes)
649
651
650
652
```yaml
651
653
- inputs:
@@ -709,7 +711,7 @@ Now, consider a scenario where a specific field needs a different calculation:
709
711
}
710
712
```
711
713
712
-
# [Kubernetes](#tab/kubernetes)
714
+
# [Kubernetes (preview)](#tab/kubernetes)
713
715
714
716
```yaml
715
717
- inputs:
@@ -753,7 +755,7 @@ Consider a special case for the same fields to help decide the right action:
0 commit comments