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: docs/fix/Fix-User-Guide.md
+9-12Lines changed: 9 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,10 @@ Flux-Example:
25
25
```
26
26
27
27
- when using the FLUX:
28
-
-- address the `fix`-module
29
-
-- you can add variables
30
-
-- The Fix transformation can be part of the FLUX `|fix("retain('245??')")` - usually useful for short fixes
31
-
-- or it can be separated in an external file, that is called in the FLUX-Process as in the code snippet above
28
+
- address the `fix`-module
29
+
- you can add variables
30
+
- The Fix transformation can be part of the FLUX `|fix("retain('245??')")` - usually useful for short fixes
31
+
- or it can be separated in an external file, that is called in the FLUX-Process as in the code snippet above
32
32
- when using it in a Java process, just add the library to your process
33
33
34
34
## Record-based and metadata manipulating approach
@@ -126,7 +126,7 @@ k : l : m : o : deepNestedField
126
126
```
127
127
128
128
The path for a simple string element is addressed by stating the element name: `a`
129
-
For the fields with deeper structure you add a dot ‘.’. The path for elements in nested objects is stated by: `b.c` or `k.l.m.o`
129
+
For the fields with deeper structure you add a dot `.`. The path for elements in nested objects is stated by: `b.c` or `k.l.m.o`
130
130
131
131
Sometimes an element can have multiple instances. Different data models solve this possibility differently. In XML records element repetition is possible and (partly) allowed in many schemas. Repeatable elements also exist in JSON and YAML but are unusual.
132
132
@@ -139,21 +139,18 @@ When working with nested structures and combinations of arrays and objects the p
139
139
140
140
You do not only need the path name for your source element but also if you want to create a new element. But remember that fix, as in catmandu, is using repeated fields and arrays as lists so if you want to create a repeated field you have to create an array without suffix [].
141
141
142
-
e.g.:
143
-
```PERL
144
-
copy_field("a", "z.y.x")
145
-
```
142
+
e.g.: `copy_field("a", "z.y.x")`
146
143
147
144
This would copy the value of z in a nested object:
148
145
149
-
```
146
+
```YAML
150
147
z :
151
148
y:
152
149
x : simpleField
153
150
```
154
151
155
152
156
-
To address paths you can use wildcards. For instance the star-wildcard: `person*` would match all simple literals with element names starting with 'person': 'person\_name', 'person\_age', etc.
153
+
To address paths you can use wildcards. For instance the star-wildcard: `person*` would match all simple literals with element names starting with `'person'`: `'person\_name'`, `'person\_age'`, etc.
157
154
Apart from the `*` wildcard, the `?` wildcard is supported. It matches exactly one arbitrary character.
158
155
159
156
Not fully supported yet is alteration of pathes.
@@ -166,7 +163,7 @@ Since FIX is not constructing a new record stream but is manipulating the existi
166
163
167
164
e.g.: if you transform MARC21 to JSON but you want to keep only certain elements that you created, you state them in a `retain` function:
0 commit comments