Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/ROOT/pages/dataweave-examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ See more XML reader and writer properties on xref:dataweave-formats.adoc#xml[Dat

== Configure CSV Reader

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].
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].

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].

Expand Down Expand Up @@ -2948,7 +2948,7 @@ Based on a mapping definition, stored for instance in a DB table, you can dynami


[NOTE]
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].
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].

=== Example Transformation

Expand Down Expand Up @@ -3155,7 +3155,7 @@ payload.results map
== See Also

* xref:dataweave-quickstart.adoc[DataWeave quickstart guide]
* xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:dataweave-language-introduction.adoc[DataWeave Language Introduction]
* xref:dataweave-operators.adoc[DataWeave Operators]
* xref:dataweave-types.adoc[DataWeave Types]
Expand Down
6 changes: 3 additions & 3 deletions modules/ROOT/pages/dataweave-flat-file-schemas.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ endif::[]

include::partial$eol-warning.adoc[]

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].
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].

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*.


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.

On 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.
On 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.


[TIP]
====
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].
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].
====


Expand Down
28 changes: 14 additions & 14 deletions modules/ROOT/pages/dataweave-formats.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ In the Transform Message component, you can define a Java type through the follo
* By Providing a sample object

[TIP]
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].

== CSV

Expand Down Expand Up @@ -162,7 +162,7 @@ Or via the UI of the Transform Message component:

image::dataweave-formats-580be.png[]

See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].



Expand Down Expand Up @@ -202,7 +202,7 @@ In the Transform Message component, you can define a CSV type through the follow
image::dataweave-formats-4a556.png[]

[TIP]
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].



Expand Down Expand Up @@ -285,7 +285,7 @@ Or via the UI of the Transform Message component:
image::dataweave-formats-excell-reader.png[]


See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].



Expand Down Expand Up @@ -320,7 +320,7 @@ image::dataweave-formats-excel-metadata.png[]


[TIP]
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].


== XML
Expand Down Expand Up @@ -396,7 +396,7 @@ Or via the UI of the Transform Message component:

image::dataweave-formats-6e5e4.png[]

See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].


=== Writer Properties
Expand Down Expand Up @@ -465,7 +465,7 @@ In the Transform Message component, you can define a XML type through the follow
* By pointing to a schema file

[TIP]
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].

=== Custom Types

Expand Down Expand Up @@ -546,7 +546,7 @@ In the Transform Message component, you can define a JSON type through the follo
* By pointing to a schema file

[TIP]
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].



Expand Down Expand Up @@ -594,7 +594,7 @@ These properties can be either set via the XML of your Mule project:

Or via the UI of the Transform Message component

See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].

[NOTE]
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).
Expand Down Expand Up @@ -641,7 +641,7 @@ In the Transform Message component, you can define a Flat File type through the
* By pointing to a schema file

[TIP]
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].



Expand Down Expand Up @@ -690,7 +690,7 @@ These properties can be either set via the XML of your Mule project:

Or via the UI of the Transform Message component

See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].

=== Writer Properties

Expand Down Expand Up @@ -737,7 +737,7 @@ In the Transform Message component, you can define a Fixed Width type through th
image::dataweave-formats-27b3c.png[]

[TIP]
See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].



Expand Down Expand Up @@ -851,7 +851,7 @@ These properties can be either set via the XML of your Mule project:

Or via the UI of the Transform Message component

See xref:6@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].
See xref:6.x@studio::input-output-structure-transformation-studio-task.adoc[To Define Input and Output Structure of a Transformation].

[NOTE]
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).
Expand Down Expand Up @@ -904,7 +904,7 @@ See xref:dataweave-flat-file-schemas.adoc[Flat File Schemas] for more detailed i
== See Also

* xref:dataweave-quickstart.adoc[DataWeave Quickstart Guide]
* xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:dataweave-language-introduction.adoc[DataWeave Language Introduction]
* xref:dataweave-operators.adoc[DataWeave Operators]
* xref:dataweave-types.adoc[DataWeave Types]
Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/dataweave-language-introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include::partial$eol-warning.adoc[]

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:

* The *Transform Message Component*, described in xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* The *Transform Message Component*, described in xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* Any Mule component that accepts Mule Expression Language, through xref:3.8@mule-runtime::mel-dataweave-functions.adoc[MEL DataWeave Functions]


Expand Down Expand Up @@ -1277,6 +1277,6 @@ Likewise, whenever you transform from XML to JSON, make sure the resulting outpu
== See Also

* xref:dataweave-quickstart.adoc[DataWeave quickstart guide]
* xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:dataweave-examples.adoc[DataWeave Examples]
* xref:3.8@mule-runtime::mel-dataweave-functions.adoc[MEL DataWeave Functions]
2 changes: 1 addition & 1 deletion modules/ROOT/pages/dataweave-memory-management.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ org.mule.transport.file.FileConnector: Writing file to: /Users/josh/output/input
== See Also

* xref:dataweave-quickstart.adoc[DataWeave quickstart guide]
* xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:dataweave-language-introduction.adoc[DataWeave Language Introduction]
* xref:dataweave-operators.adoc[DataWeave Operators]
* xref:dataweave-types.adoc[DataWeave Types]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/dataweave-migrator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ endif::[]

include::partial$eol-warning.adoc[]

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.
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.

[NOTE]
This migration tool is still in beta phase.
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/dataweave-operators.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,7 @@ You can change the format of a date to fit another standard, see <<Coerce to dat
== See Also

* xref:dataweave-quickstart.adoc[DataWeave quickstart guide]
* xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:dataweave-language-introduction.adoc[DataWeave Language Introduction]
* xref:dataweave-types.adoc[DataWeave Types]
* xref:dataweave-formats.adoc[DataWeave Formats]
Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/dataweave-quickstart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ image::dataweave-quickstart-set-payload.png[]

== Phase 2 - Map Input Fields to Output Fields

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:
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:

** `address` and `address1`
** `city` and `city`
Expand Down Expand Up @@ -528,7 +528,7 @@ If you open the *Preview* section, you can see what this transform would output,
== See Also

* More advanced examples in xref:dataweave-examples.adoc[DataWeave Examples]
* xref:6@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:6.x@studio::transform-message-component-concept-studio.adoc[About Transform Message Component]
* xref:dataweave-language-introduction.adoc[DataWeave Language Introduction]
* xref:dataweave-operators.adoc[DataWeave Operators]
* xref:dataweave-types.adoc[DataWeave Types]
Expand Down
8 changes: 4 additions & 4 deletions modules/ROOT/pages/dataweave-reference-documentation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Valid types are:

When defining an input of type CSV, there are a few optional parameters you can add to the input directive to customize how the data is parsed. These are not defined in the DataWeave script but on the Mule XML code, in the Transform Message XML element.

In Anypoint Studio there are two ways to achieve this. You can either manually add the attributes to the project's XML, or do it through the graphical interface, by selecting the element from the tree view in the input section and clicking the gear icon. See xref:5@studio::using-dataweave-in-studio.adoc#parsing-csv-inputs[Using DataWeave in Studio] for more details.
In Anypoint Studio there are two ways to achieve this. You can either manually add the attributes to the project's XML, or do it through the graphical interface, by selecting the element from the tree view in the input section and clicking the gear icon. See xref:5.x@studio::using-dataweave-in-studio.adoc#parsing-csv-inputs[Using DataWeave in Studio] for more details.

==== Output Directive

Expand Down Expand Up @@ -3476,7 +3476,7 @@ c: |2003-10-01T23:57:59Z| + |P1Y|

Your DataWeave code can call any function you define as a global xref:3.7@mule-runtime::mule-expression-language-mel.adoc[Mule Expression Language (MEL)] function, as long as it is correctly defined in the Mule Project where your Transform Message element sits.

Refer to xref:5@studio::using-dataweave-in-studio.adoc#calling-global-mel-functions-from-dataweave-code[Using DataWeave in Studio].
Refer to xref:5.x@studio::using-dataweave-in-studio.adoc#calling-global-mel-functions-from-dataweave-code[Using DataWeave in Studio].

== Object

Expand Down Expand Up @@ -4059,7 +4059,7 @@ books: payload.items.*item map
}
----

In Anypoint Studio, you can define several more values, like separators, quote characters and escape characters. See xref:5@studio::using-dataweave-in-studio.adoc#configuring-the-csv-reader[Using DataWeave in Studio].
In Anypoint Studio, you can define several more values, like separators, quote characters and escape characters. See xref:5.x@studio::using-dataweave-in-studio.adoc#configuring-the-csv-reader[Using DataWeave in Studio].

== Functions and Lambdas

Expand Down Expand Up @@ -4220,6 +4220,6 @@ You can reference any *Property* (System or Spring) that exists in the server wh

== See Also

* xref:5@studio::using-dataweave-in-studio.adoc[Using DataWeave in Studio]
* xref:5.x@studio::using-dataweave-in-studio.adoc[Using DataWeave in Studio]
* xref:dataweave-examples.adoc[DataWeave Examples]
* https://www.mulesoft.com/platform/studio[Anypoint Studio]
Loading