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-operations/connect-to-cloud/howto-create-dataflow.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -401,7 +401,21 @@ Currently, the enrich operation isn't available in the operations experience por
401
401
402
402
# [Bicep](#tab/bicep)
403
403
404
+
For example, you could use the `deviceId` field in the source data to match the `asset` field in the dataset:
405
+
404
406
```bicep
407
+
builtInTransformationSettings: {
408
+
datasets: [
409
+
{
410
+
key: 'assetDataset'
411
+
inputs: [
412
+
'$source.deviceId', // Reference to the device ID from the source
413
+
'$context(assetDataset).asset' // Reference to the asset from the dataset context
414
+
]
415
+
expression: '$1 == $2' // Expression to evaluate the inputs
416
+
}
417
+
]
418
+
}
405
419
406
420
```
407
421
@@ -455,6 +469,22 @@ To filter the data on a condition, you can use the `filter` stage. The condition
455
469
456
470
# [Bicep](#tab/bicep)
457
471
472
+
For example, you could use the `temperature` field in the source data to filter the data:
473
+
474
+
```bicep
475
+
builtInTransformationSettings: {
476
+
filter: [
477
+
{
478
+
inputs: [
479
+
'temperature ? $last' // Reference to the last temperature value, if available
480
+
]
481
+
expression: '$1 > 20' // Expression to filter based on the temperature value
482
+
}
483
+
]
484
+
}
485
+
486
+
```
487
+
458
488
# [Kubernetes](#tab/kubernetes)
459
489
460
490
For example, you could use the `temperature` field in the source data to filter the data:
@@ -490,6 +520,29 @@ In the operations experience portal, mapping is currently supported using **Comp
490
520
491
521
# [Bicep](#tab/bicep)
492
522
523
+
For example, you could use the `temperature` field in the source data to convert the temperature to Celsius and store it in the `temperatureCelsius` field. You could also enrich the source data with the `location` field from the contextualization dataset:
524
+
525
+
```bicep
526
+
builtInTransformationSettings: {
527
+
map: [
528
+
{
529
+
inputs: [
530
+
'temperature' // Reference to the temperature input
531
+
]
532
+
output: 'temperatureCelsius' // Output variable for the converted temperature
533
+
expression: '($1 - 32) * 5/9' // Expression to convert Fahrenheit to Celsius
534
+
}
535
+
{
536
+
inputs: [
537
+
'$context(assetDataset).location' // Reference to the location from the dataset context
538
+
]
539
+
output: 'location' // Output variable for the location
540
+
}
541
+
]
542
+
}
543
+
544
+
```
545
+
493
546
# [Kubernetes](#tab/kubernetes)
494
547
495
548
For example, you could use the `temperature` field in the source data to convert the temperature to Celsius and store it in the `temperatureCelsius` field. You could also enrich the source data with the `location` field from the contextualization dataset:
0 commit comments