Reshape JSON or XML with a JMESPath expression (jmespath.py, spec built-in functions only): extract fields, filter, sort, flatten and merge lists, build new objects. Literals need backticks or quotes: [?priority > `2`], [?status=='open'] (a bare word is a field name). Pass previous results as data (e.g. {"tickets": results.a, "users": results.b}); a string in data is parsed as JSON (or XML). For large inputs, pass a JSON or XML file from the workspace object storage as s3_file instead; it is still parsed whole in worker memory. input_format xml parses XML first (xmltodict): attributes become "@name" keys and namespaced tags "ns:tag" keys (quote both in expressions), values are strings or null for an empty element (compare and sort numbers with to_number, as strings sort lexically), and an element that appears once is an object (wrap with to_array). With the default expression @ the step just converts XML to JSON. write_to_s3 stores the result as JSON in object storage and returns its S3 object, which a later step takes as s3_file. Syntax errors repeat the expression with a caret under the failing column. Validated live on Windmill with MinIO object storage (JSON and XML flow steps, merging, S3 round trip, error cases).
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 | |
45 | |
46 | |
47 | |
48 | |
49 | |
50 | |
51 | |
52 | |
53 | |
54 | |
55 | |
56 | |
57 | |
58 | |
59 | |
60 | |
61 | |
62 | |
63 | |
64 | |
65 | |
66 | |
67 | |
68 | |
69 | |
70 | |
71 | |