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: modules/ROOT/pages/dataweave-examples.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1633,7 +1633,7 @@ See more XML reader and writer properties on xref:dataweave-formats.adoc#xml[Dat
1633
1633
1634
1634
== Configure CSV Reader
1635
1635
1636
-
DataWeave supports CSV inputs and outputs, by configuring the reader and writer properties, you can adapt it to different conventions regarding separations, line breaks, etc. Other formats also allow for this kind of configuration. See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation] for how to do this on the UI, or look at the xref:dataweave-xml-reference.adoc#reader-configuration[DataWeave XML Reference] for the required XML syntax. You can also see a full reference of the reader properties available with CSV format on xref:dataweave-formats.adoc#csv[DataWeave formats].
1636
+
DataWeave supports CSV inputs and outputs, by configuring the reader and writer properties, you can adapt it to different conventions regarding separations, line breaks, etc. Other formats also allow for this kind of configuration. See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation] for how to do this on the UI, or look at the xref:dataweave-xml-reference.adoc#reader-configuration[DataWeave XML Reference] for the required XML syntax. You can also see a full reference of the reader properties available with CSV format on xref:dataweave-formats.adoc#csv[DataWeave formats].
1637
1637
1638
1638
Reader properties are set as part of the XML `dw:transform-message` component, whilst writer properties are specified in the DataWeave code itself, as part of the output directive. You can see a full reference to the writer properties available with CSV format on xref:dataweave-formats.adoc#writer-properties[DataWeave formats].
1639
1639
@@ -2486,7 +2486,7 @@ Based on a mapping definition, stored for instance in a DB table, you can dynami
2486
2486
2487
2487
2488
2488
[NOTE]
2489
-
Note that for this example to work, on the payload input you must set the reader configuration so that the 'nullValueOn' attribute is "empty". See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
2489
+
Note that for this example to work, on the payload input you must set the reader configuration so that the 'nullValueOn' attribute is "empty". See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
DataWeave enables you to process several different xref:dataweave-formats.adoc[types of data]. For most of these types, you can import a schema that describes the input structure in order to have access to valuable metadata at design time. See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
8
+
DataWeave enables you to process several different xref:dataweave-formats.adoc[types of data]. For most of these types, you can import a schema that describes the input structure in order to have access to valuable metadata at design time. See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
9
9
10
10
DataWeave uses a YAML format called *FFD (for Flat File Definition)* to represent flat file schemas. The FFD format is very flexible to support a range of use cases, but is based around the concepts of *elements*, *composites*, *segments*, *groups* and *structures*.
11
11
12
12
13
13
Schemas must be written in Flat File Schema Language, with a *.ffs* extension. This language is very similar to EDI Schema Language (ESL), which is also accepted by Anypoint Studio.
14
14
15
-
In DataWeave, you can bind your input or your output to a flat file schema through a property. See xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component] for instructions on how to do this through the Studio UI. If you want to do this through code, see xref:dataweave-formats.adoc#flat-file[DataWeave formats] for more information, and keep in mind that the way these properties are set depends on if you're defining the input or the output.
15
+
In DataWeave, you can bind your input or your output to a flat file schema through a property. See xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component] for instructions on how to do this through the Studio UI. If you want to do this through code, see xref:dataweave-formats.adoc#flat-file[DataWeave formats] for more information, and keep in mind that the way these properties are set depends on if you're defining the input or the output.
16
16
17
17
18
18
[TIP]
19
19
====
20
-
If you intend to use a fixed-width format, you can set up your structure directly through an editor in the UI of the Transform Message component, that makes this a lot easier, just select the `Fixed Width` type. See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
20
+
If you intend to use a fixed-width format, you can set up your structure directly through an editor in the UI of the Transform Message component, that makes this a lot easier, just select the `Fixed Width` type. See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
21
21
22
22
Note that flat file schema files are sensitive to indentation.
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
321
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
322
322
323
323
324
324
== XML
@@ -395,7 +395,7 @@ Or via the UI of the Transform Message component:
395
395
396
396
image::dataweave-formats-6e5e4.png[]
397
397
398
-
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
398
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
399
399
400
400
401
401
=== Writer Properties (for XML)
@@ -464,7 +464,7 @@ In the Transform Message component, you can define a XML type through the follow
464
464
* By pointing to a schema file
465
465
466
466
[TIP]
467
-
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
467
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
468
468
469
469
=== Custom Types
470
470
@@ -545,7 +545,7 @@ In the Transform Message component, you can define a JSON type through the follo
545
545
* By pointing to a schema file
546
546
547
547
[TIP]
548
-
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
548
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
549
549
550
550
551
551
@@ -576,7 +576,7 @@ These properties can be set through the XML of your Mule project:
576
576
577
577
Alternatively, you can set them through the UI of the Transform Message component.
578
578
579
-
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
579
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
580
580
581
581
[NOTE]
582
582
Schemas with type `Binary` or `Packed` don't allow for line breaks to be detected, so setting `recordParsing` to "lenient"` will only allow long records to be handled, but not short ones. These schemas also currently only work with certain single-byte character encodings (so not with UTF-8 or any multibyte format).
@@ -610,7 +610,7 @@ In the Transform Message component, you can define a Flat File type through the
610
610
* By pointing to a schema file
611
611
612
612
[TIP]
613
-
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
613
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
614
614
615
615
616
616
@@ -647,7 +647,7 @@ These properties can be either set via the XML of your Mule project:
647
647
648
648
Or via the UI of the Transform Message component
649
649
650
-
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
650
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
651
651
652
652
=== Writer Properties (for Fixed Width)
653
653
@@ -683,7 +683,7 @@ In the Transform Message component, you can define a Fixed Width type through th
683
683
image::dataweave-formats-27b3c.png[]
684
684
685
685
[TIP]
686
-
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
686
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
687
687
688
688
689
689
@@ -951,7 +951,7 @@ These properties can be either set via the XML of your Mule project:
951
951
952
952
Or via the UI of the Transform Message component
953
953
954
-
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
954
+
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
955
955
956
956
[NOTE]
957
957
Schemas with type `Binary` or `Packed` don't allow for line breaks to be detected, so setting `recordParsing` to "lenient"` will only allow long records to be handled, but not short ones. These schemas also currently only work with certain single-byte character encodings (so not with UTF-8 or any multibyte format).
@@ -1039,7 +1039,7 @@ See xref:dataweave-flat-file-schemas.adoc[Flat File Schemas] for more detailed i
Copy file name to clipboardExpand all lines: modules/ROOT/pages/dataweave-language-introduction.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ endif::[]
7
7
8
8
The DataWeave language is a powerful template engine that allows you to transform data to and from any kind of format (XML, CSV, JSON, Pojos, Maps, etc). In Anypoint Studio, this language can be used in:
9
9
10
-
* The *Transform Message Component*, described in xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
10
+
* The *Transform Message Component*, described in xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
11
11
* Any Mule component that accepts Mule Expression Language, through xref:3.9@mule-runtime::mel-dataweave-functions.adoc[MEL DataWeave Functions]
12
12
13
13
@@ -1277,6 +1277,6 @@ Likewise, whenever you transform from XML to JSON, make sure the resulting outpu
If you have projects that are built with the deprecated xref:6@studio::datamapper-user-guide-and-reference.adoc[DataMapper], a migration tool is now included in Studio, which assists in converting a DataMapper map to DataWeave. This tool doesn't replace the original DataMapper in your flow, it creates a new equivalent DataWeave component next to it. The old DataMapper component is left in its place so that you can compare both as they sit next to each other on your flow, but you must then delete it for the flow to be executable.
8
+
If you have projects that are built with the deprecated xref:6.x@studio::datamapper-user-guide-and-reference.adoc[DataMapper], a migration tool is now included in Studio, which assists in converting a DataMapper map to DataWeave. This tool doesn't replace the original DataMapper in your flow, it creates a new equivalent DataWeave component next to it. The old DataMapper component is left in its place so that you can compare both as they sit next to each other on your flow, but you must then delete it for the flow to be executable.
Use the xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component] to create the actual mapping between the input and output fields. Simply click and drag a field in the input side to a field in the output side. The most obvious task is to match similarly named fields together, thus helping to validate the output data:
167
+
Use the xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component] to create the actual mapping between the input and output fields. Simply click and drag a field in the input side to a field in the output side. The most obvious task is to match similarly named fields together, thus helping to validate the output data:
168
168
169
169
** `address` and `address1`
170
170
** `city` and `city`
@@ -527,7 +527,7 @@ If you open the *Preview* section, you can see what this transform would output,
527
527
== See Also
528
528
529
529
* More advanced examples in xref:dataweave-examples.adoc[DataWeave Examples]
0 commit comments