Skip to content

Commit 132c67c

Browse files
committed
docs: fix cramped multi-input table formatting in expressions reference
Use <br> line breaks to separate multiple inputs within table cells instead of cramming them all on one line.
1 parent b70c576 commit 132c67c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

articles/iot-operations/connect-to-cloud/concept-dataflow-graphs-expressions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ Mapping configuration that uses wildcards:
434434

435435
| Input | Output | Expression |
436436
|-------|--------|------------|
437-
| `*.Max` ($1), `*.Min` ($2) | `ColorProperties.*` | `($1 + $2) / 2` |
437+
| `*.Max` ($1)<br>`*.Min` ($2) | `ColorProperties.*` | `($1 + $2) / 2` |
438438

439439
Resulting JSON:
440440

@@ -487,7 +487,7 @@ Initial mapping configuration that uses wildcards:
487487

488488
| Input | Output | Expression |
489489
|-------|--------|------------|
490-
| `*.Max` ($1), `*.Min` ($2), `*.Avg` ($3), `*.Mean` ($4) | `ColorProperties.*` | `($1, $2, $3, $4)` |
490+
| `*.Max` ($1)<br>`*.Min` ($2)<br>`*.Avg` ($3)<br>`*.Mean` ($4) | `ColorProperties.*` | `($1, $2, $3, $4)` |
491491

492492
This initial mapping tries to build an array (for example, for `Opacity`: `[0.88, 0.91, 0.89, 0.89]`). This configuration fails because:
493493

@@ -504,7 +504,7 @@ Corrected mapping configuration:
504504

505505
| Input | Output | Expression |
506506
|-------|--------|------------|
507-
| `*.Max` ($1), `*.Min` ($2), `*.Mid.Avg` ($3), `*.Mid.Mean` ($4) | `ColorProperties.*` | `($1, $2, $3, $4)` |
507+
| `*.Max` ($1)<br>`*.Min` ($2)<br>`*.Mid.Avg` ($3)<br>`*.Mid.Mean` ($4) | `ColorProperties.*` | `($1, $2, $3, $4)` |
508508

509509
This revised mapping accurately captures the necessary fields. It correctly specifies the paths to include the nested `Mid` object, which ensures that the asterisks work effectively across different levels of the JSON structure.
510510

@@ -514,8 +514,8 @@ When you use the previous example from multi-input wildcards, consider the follo
514514

515515
| Input | Output | Expression |
516516
|-------|--------|------------|
517-
| `*.Max` ($1), `*.Min` ($2) | `ColorProperties.*.Avg` | `($1 + $2) / 2` |
518-
| `*.Max` ($1), `*.Min` ($2) | `ColorProperties.*.Diff` | `$1 - $2` |
517+
| `*.Max` ($1)<br>`*.Min` ($2) | `ColorProperties.*.Avg` | `($1 + $2) / 2` |
518+
| `*.Max` ($1)<br>`*.Min` ($2) | `ColorProperties.*.Diff` | `$1 - $2` |
519519

520520
This mapping is intended to create two separate calculations (`Avg` and `Diff`) for each property under `ColorProperties`. This example shows the result:
521521

@@ -544,8 +544,8 @@ Now, consider a scenario where a specific field needs a different calculation:
544544

545545
| Input | Output | Expression |
546546
|-------|--------|------------|
547-
| `*.Max` ($1), `*.Min` ($2) | `ColorProperties.*` | `($1 + $2) / 2` |
548-
| `Opacity.Max` ($1), `Opacity.Min` ($2) | `ColorProperties.OpacityAdjusted` | `($1 + $2 + 1.32) / 2` |
547+
| `*.Max` ($1)<br>`*.Min` ($2) | `ColorProperties.*` | `($1 + $2) / 2` |
548+
| `Opacity.Max` ($1)<br>`Opacity.Min` ($2) | `ColorProperties.OpacityAdjusted` | `($1 + $2 + 1.32) / 2` |
549549

550550
In this case, the `Opacity` field has a unique calculation. Two options to handle this overlapping scenario are:
551551

@@ -556,7 +556,7 @@ Consider a special case for the same fields to help decide the right action:
556556

557557
| Input | Output | Expression |
558558
|-------|--------|------------|
559-
| `*.Max` ($1), `*.Min` ($2) | `ColorProperties.*` | `($1 + $2) / 2` |
559+
| `*.Max` ($1)<br>`*.Min` ($2) | `ColorProperties.*` | `($1 + $2) / 2` |
560560
| `Opacity.Max`, `Opacity.Min` | *(empty)* | |
561561

562562
An empty output field in the second definition implies not writing the fields in the output record (effectively removing `Opacity`). This setup is more of a `Specialization` than a `Second Rule`.

0 commit comments

Comments
 (0)