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-dataflow-graphs-map.md
+42-25Lines changed: 42 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -461,6 +461,48 @@ This rule uses the current value when present, falls back to the last known valu
461
461
462
462
You can augment messages with data from an external state store by configuring datasets. For example, look up a device's metadata by its ID and include it in the output. For details, see [Enrich with external data](howto-dataflow-graphs-enrich.md).
463
463
464
+
## Data flow graph exclusive features
465
+
466
+
Data flow graphs support several features that aren't available in data flow `builtInTransformation` mappings.
467
+
468
+
### Default values for missing fields
469
+
470
+
Use the `?? <default>` syntax on an input to provide a static fallback when a field is missing. This is simpler than writing an `if` expression to check for empty values.
471
+
472
+
# [Operations experience](#tab/portal)
473
+
474
+
In the map transform configuration, set the input to include the `??` syntax followed by the default value. For example, enter `temperature ?? 0` as the input field to use `0` when the temperature field is missing.
475
+
476
+
# [Bicep](#tab/bicep)
477
+
478
+
```bicep
479
+
{
480
+
inputs: [ 'temperature ?? 0' ]
481
+
output: 'temperature'
482
+
}
483
+
```
484
+
485
+
# [Kubernetes (preview)](#tab/kubernetes)
486
+
487
+
```yaml
488
+
- inputs:
489
+
- temperature ?? 0
490
+
output: temperature
491
+
```
492
+
493
+
---
494
+
495
+
For details on supported default types and combining defaults with last known values, see [Default values](concept-dataflow-graphs-expressions.md#default-values) in the expressions reference.
496
+
497
+
### Regex functions
498
+
499
+
Data flow graphs support regular expression matching and replacement:
500
+
501
+
- `str::regex_matches(string, pattern)`: Returns true if the string matches the regex pattern.
502
+
- `str::regex_replace(string, pattern, replacement)`: Replaces all regex matches with the replacement string.
503
+
504
+
These functions are useful in filter expressions or for cleaning and transforming string data. For the full list of string functions, see [String functions](concept-dataflow-graphs-expressions.md#string-functions) in the expressions reference.
505
+
464
506
## Full configuration example
465
507
466
508
Here's a complete map configuration that copies all fields, removes sensitive data, restructures a field, and computes a derived value:
@@ -576,31 +618,6 @@ For the full `DataflowGraph` resource structure, see [Data flow graphs overview]
576
618
577
619
---
578
620
579
-
## Data flow graph exclusive features
580
-
581
-
Data flow graphs support several features that aren't available in data flow `builtInTransformation` mappings.
582
-
583
-
### Default values for missing fields
584
-
585
-
Use the `?? <default>` syntax on an input to provide a static fallback when a field is missing. This is simpler than writing an `if` expression to check for empty values.
586
-
587
-
```yaml
588
-
- inputs:
589
-
- temperature ?? 0
590
-
output: temperature
591
-
```
592
-
593
-
For details on supported default types and combining defaults with last known values, see [Default values](concept-dataflow-graphs-expressions.md#default-values) in the expressions reference.
594
-
595
-
### Regex functions
596
-
597
-
Data flow graphs support regular expression matching and replacement:
598
-
599
-
- `str::regex_matches(string, pattern)`: Returns true if the string matches the regex pattern.
600
-
- `str::regex_replace(string, pattern, replacement)`: Replaces all regex matches with the replacement string.
601
-
602
-
These functions are useful in filter expressions or for cleaning and transforming string data. For the full list of string functions, see [String functions](concept-dataflow-graphs-expressions.md#string-functions) in the expressions reference.
603
-
604
621
## Next steps
605
622
606
623
- [Filter and route data](howto-dataflow-graphs-filter-route.md)
0 commit comments