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
*[Normalize objects to arrays (working with dynamic keys)](/refguide/data-transformer-how-tos/#normalising-objects-to-arrays-working-with-dynamic-keys)
122
-
*[Zip metadata with data](/refguide/data-transformer-how-tos/#zipping-metadata-with-data)
123
-
*[Flatten bill of materials (BOM)](/refguide/data-transformer-how-tos/#flattening-bill-of-materials-bom)
124
-
*[Extract information from a string](/refguide/data-transformer-how-tos/#extracting-information-from-a-string)
125
-
*[Work with SPARQL query results](/refguide/data-transformer-how-tos/#working-with-sparql-query-results)
119
+
*[Filter out unused fields](/refguide/data-transformer-use-cases/#filtering-out-unused-fields)
Copy file name to clipboardExpand all lines: content/en/docs/refguide/modeling/integration/data-transformers/data-transformer-use-cases.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Each walkthrough focuses on a specific use case you may encounter when working w
16
16
The [Data Transformer document](/refguide/data-transformers/) feature is in beta.
17
17
{{% /alert %}}
18
18
19
-
## Filtering Out Unused Fields
19
+
## Filtering Out Unused Fields {#filtering-out-unused-fields}
20
20
21
21
It is common for an API to return payloads that contain more fields than your app or a downstream system needs. Rather than passing the entire payload along, this transformation selects only the fields that are relevant, effectively dropping everything else. This keeps the output clean, reduces payload size, and avoids exposing unnecessary data.
22
22
@@ -62,7 +62,7 @@ In JSLT, the output object is always constructed explicitly. Only the fields you
62
62
63
63
For more information about constructing JSLT queries, see this [GitHub resource](https://github.com/schibsted/jslt/blob/master/tutorial.md#dot-accessors).
Sometimes a JSON structure contains nested sub-objects that group related fields together, but you just need a simpler, flat representation. This transformation moves fields from nested sub-objects up to the top level, merging them into a single flat object.
68
68
@@ -124,7 +124,7 @@ The transformation is straightforward. Each field in the output is explicitly ma
124
124
For more information about dot accessors, see this [GitHub resource](https://github.com/schibsted/jslt/blob/master/tutorial.md#dot-accessors).
125
125
126
126
127
-
## Normalizing Objects to Arrays
127
+
## Normalizing Objects to Arrays {#normalizing-objects-to-arrays}
128
128
129
129
Some APIs return collections of records as a keyed object, where each key acts as a unique identifier for that record (also known as dynamic keys). Mendix works more naturally with lists of objects, so this transformation converts that keyed structure into a flat, normalized array that can be directly mapped to a Mendix entity list.
130
130
@@ -201,7 +201,7 @@ So for (`.data`) iterates over each entry, exposing `.key` (for example, `"Tag1"
201
201
202
202
For more information on expressions and constructing lists in JSLT, see this [GitHub resource](https://github.com/schibsted/jslt/blob/master/tutorial.md#for-expressions).
203
203
204
-
## Zipping Metadata with Data
204
+
## Zipping Metadata with Data {#zipping-metadata-with-data}
205
205
206
206
Some APIs return data and its metadata separately. The metadata describes the structure (for example, column names), while the data is returned as raw arrays. This is the case with Snowflake SQL REST APIs. To make the data meaningful and easy to consume, combine the two so that each value is associated with its corresponding column name.
207
207
@@ -292,7 +292,7 @@ For more information about declaring variables, see this [GitHub resource](https
292
292
293
293
For more information about zip and other functions, see this [GitHub resource](https://github.com/schibsted/jslt/blob/master/functions.md#ziparray1-array2---array).
294
294
295
-
## Flattening Bill of Materials (BOM)
295
+
## Flattening Bill of Materials (BOM) {#flattening-bill-of-materials}
296
296
297
297
A Bill of Materials (BOM) is naturally represented as a tree structure, where each assembly can contain child sub-assemblies, which can themselves contain further children. Flattening such a structure into a simple list is sometimes needed when feeding data into downstream systems that expect a flat, tabular format. This transformation also simplifies the import mapping process of the BOM to Mendix entities.
298
298
@@ -407,7 +407,7 @@ The root of the transformation starts this by calling `flatten-assemblies` on `r
407
407
408
408
For more information about declaring functions in JSLT, see this [GitHub resource](https://github.com/schibsted/jslt/blob/master/tutorial.md#function-declarations).
409
409
410
-
## Extracting Information from a String
410
+
## Extracting Information from a String {#extracting-information-from-a-string}
411
411
412
412
Sometimes multiple pieces of information are encoded within a single structured string, such as a file path, an identifier, or a URL, and you need to extract a specific piece of that information for use downstream or in your own app. JSLT string functions allow you to extract each component into its own dedicated field. This makes the data easier to consume, filter, and process without placing any additional burden on the downstream step.
413
413
@@ -457,7 +457,7 @@ Each segment is then accessed by its index: `[0]` for the first element, `[1]` f
457
457
458
458
For more information about useful built-in functions, see this [GitHub resource](https://github.com/schibsted/jslt/blob/master/functions.md#jslt-functions).
459
459
460
-
## Working with SPARQL Query Results
460
+
## Working with SPARQL Query Results {#working-with-sparql-query-results}
461
461
462
462
SPARQL is a query language for RDF data, commonly used with knowledge graphs and semantic web APIs. Its query results follow a standard JSON format where the column names (called variables) are declared separately in a head block, and the actual result rows are returned as bindings, a list of objects where each key maps to a typed value wrapper rather than a plain value. This structure is precise and interoperable, but verbose. Transforming it into a simple flat list of objects makes it far easier to work with in import mappings.
0 commit comments