SlideShare a Scribd company logo
1 of 9
DataWeave Overview
DataWeave Definition
The DataWeave language is a simple, powerful tool to query and
transform data inside of Mule.
DataWeave Features
It can be used in two different ways:
• You can graphically map fields by dragging and dropping them, as
could be done with the deprecated Data Mapper
• Or you can leverage its powerful JSON-like language that’s purposely
built to make writing transformations as fast as possible and highly
maintainable over the long term. It supports a variety of
transformations, from simple one-to-one mappings, to more
elaborate mappings including normalization, grouping, joins,
partitioning, pivoting and filtering.
DataWeave-Header
The DataWeave header contains the directives, which define high level
information about your transformation. The structure of the Header is
a sequence of lines, each with its own Directives. The Header is
terminated with '---'.
DataWeave-Directives
Through directives you can define:
• DataWeave version
• Input types and sources
• Output type
• Namespaces to import into your transform
• Constants that can be referenced throughout the body
• Functions that can be called throughout the body
DataWeave- Version& Namespace Directive
Version Directive:
• Through this directive, you specify the version of the DataWeave syntax
that is used to interpret the transformation.
%dw1.0
Namespace Directive:
• This directive associates an alias with its subsequent URI. The directive is
relevant only when either the input or the output is of type XML.
%namespace ns0 http://www.mulesoft.com/anypoint/SOA/message/v1
DataWeave-Input & Output Directive
When using DataWeave in Anypoint Studio, it’s not necessary to declare
input directives for any of the components of the Mule Message that arrive
at the DataWeave transformer (Payload, flow variables, and input/outbound
properties) nor for any system variables. These are already implicitly
recognized as inputs and can be referenced anywhere in the DataWeave
body without a need to include them in the header because their type is
known from the Mule metadata.
Inputs are declared by assigning a name and a content type.
%input payload application/xml
Valid types are:
application/json, application/xml, application/java, application/csv,
application/dw, text/json, text/xml, text/csv
DataWeave-Input & Output Directive(cont..)
The Output Directive specifies what the output type is in a
transformation, which is specified using content/type. Only one output
can be specified, the structure of this output is then defined in the
DataWeave body.
%output application/xml
Valid types are:
application/json, application/xml, application/java, application/csv,
application/dw, text/json, text/xml, text/csv
Thank you

More Related Content

What's hot

Mule data weave_4
Mule data weave_4Mule data weave_4
Mule data weave_4kunal vishe
 
Xml to-object-transformer
Xml to-object-transformerXml to-object-transformer
Xml to-object-transformerSanni Kumar Pal
 
Introduction to dataweave
Introduction to dataweaveIntroduction to dataweave
Introduction to dataweaveSwati Deshpande
 
Mule Expression Transformer
Mule Expression TransformerMule Expression Transformer
Mule Expression TransformerAnkush Sharma
 
Mule scopes foreach_scope
Mule scopes foreach_scopeMule scopes foreach_scope
Mule scopes foreach_scopekunal vishe
 
Choice router mule
Choice router   muleChoice router   mule
Choice router muleSindhu VL
 
Mule xml to-jaxb object
Mule xml to-jaxb objectMule xml to-jaxb object
Mule xml to-jaxb objectAnkush Sharma
 
Mule expression component
Mule expression componentMule expression component
Mule expression componentKarnam Karthik
 
MuleSoft Nashik Virtual Meetup#3 - Deep Dive Into DataWeave and its Module
MuleSoft Nashik Virtual  Meetup#3 - Deep Dive Into DataWeave and its ModuleMuleSoft Nashik Virtual  Meetup#3 - Deep Dive Into DataWeave and its Module
MuleSoft Nashik Virtual Meetup#3 - Deep Dive Into DataWeave and its ModuleJitendra Bafna
 

What's hot (15)

Variables in dataweave
Variables in dataweaveVariables in dataweave
Variables in dataweave
 
Mule mel 5_tips
Mule mel 5_tipsMule mel 5_tips
Mule mel 5_tips
 
Mule data weave_4
Mule data weave_4Mule data weave_4
Mule data weave_4
 
Xml to-object-transformer
Xml to-object-transformerXml to-object-transformer
Xml to-object-transformer
 
Introduction to dataweave
Introduction to dataweaveIntroduction to dataweave
Introduction to dataweave
 
Mule Expression Transformer
Mule Expression TransformerMule Expression Transformer
Mule Expression Transformer
 
Mule mel 1
Mule mel 1Mule mel 1
Mule mel 1
 
Mule scopes foreach_scope
Mule scopes foreach_scopeMule scopes foreach_scope
Mule scopes foreach_scope
 
Choice router mule
Choice router   muleChoice router   mule
Choice router mule
 
Mule data weave
Mule data weaveMule data weave
Mule data weave
 
Dataweave in studio
Dataweave in studioDataweave in studio
Dataweave in studio
 
Mule xml to-jaxb object
Mule xml to-jaxb objectMule xml to-jaxb object
Mule xml to-jaxb object
 
Mule expression component
Mule expression componentMule expression component
Mule expression component
 
Dataweave nagarjuna
Dataweave nagarjunaDataweave nagarjuna
Dataweave nagarjuna
 
MuleSoft Nashik Virtual Meetup#3 - Deep Dive Into DataWeave and its Module
MuleSoft Nashik Virtual  Meetup#3 - Deep Dive Into DataWeave and its ModuleMuleSoft Nashik Virtual  Meetup#3 - Deep Dive Into DataWeave and its Module
MuleSoft Nashik Virtual Meetup#3 - Deep Dive Into DataWeave and its Module
 

Similar to Mule dataweave (20)

Data weave reference documentation
Data weave reference documentationData weave reference documentation
Data weave reference documentation
 
Data weave in mule
Data weave in muleData weave in mule
Data weave in mule
 
Mule data weave_2
Mule data weave_2Mule data weave_2
Mule data weave_2
 
Data weave (MuleSoft)
Data weave (MuleSoft)Data weave (MuleSoft)
Data weave (MuleSoft)
 
Data weave in Mule
Data weave in MuleData weave in Mule
Data weave in Mule
 
Data weave
Data weaveData weave
Data weave
 
Data weave
Data weave Data weave
Data weave
 
Dataweave
Dataweave Dataweave
Dataweave
 
Data weave
Data weave Data weave
Data weave
 
Data weave
Data weave Data weave
Data weave
 
Data weave
Data weave Data weave
Data weave
 
Dataweave Basic
Dataweave BasicDataweave Basic
Dataweave Basic
 
Data weave documentation
Data weave documentationData weave documentation
Data weave documentation
 
Mule any point studio
Mule any point studioMule any point studio
Mule any point studio
 
Mule esb kranthi
Mule esb kranthiMule esb kranthi
Mule esb kranthi
 
Mule esb kranthi
Mule esb kranthiMule esb kranthi
Mule esb kranthi
 
Mule esb
Mule esb Mule esb
Mule esb
 
Mule
MuleMule
Mule
 
Esb process
Esb processEsb process
Esb process
 
Mule
MuleMule
Mule
 

More from Padmanabhan Natarajan, CSM (11)

Mule routers(flowcontrol)
Mule routers(flowcontrol)Mule routers(flowcontrol)
Mule routers(flowcontrol)
 
Mule scope
Mule scopeMule scope
Mule scope
 
Mule async scope
Mule async scopeMule async scope
Mule async scope
 
Mule filters
Mule filtersMule filters
Mule filters
 
Mule transformers
Mule transformersMule transformers
Mule transformers
 
Mule poll scope
Mule poll scopeMule poll scope
Mule poll scope
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Introduction to munit
Introduction to munitIntroduction to munit
Introduction to munit
 
Mule exceptions Strategy
Mule exceptions StrategyMule exceptions Strategy
Mule exceptions Strategy
 
Mule messages
Mule messagesMule messages
Mule messages
 
Mule esb
Mule esbMule esb
Mule esb
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Mule dataweave

  • 2. DataWeave Definition The DataWeave language is a simple, powerful tool to query and transform data inside of Mule.
  • 3. DataWeave Features It can be used in two different ways: • You can graphically map fields by dragging and dropping them, as could be done with the deprecated Data Mapper • Or you can leverage its powerful JSON-like language that’s purposely built to make writing transformations as fast as possible and highly maintainable over the long term. It supports a variety of transformations, from simple one-to-one mappings, to more elaborate mappings including normalization, grouping, joins, partitioning, pivoting and filtering.
  • 4. DataWeave-Header The DataWeave header contains the directives, which define high level information about your transformation. The structure of the Header is a sequence of lines, each with its own Directives. The Header is terminated with '---'.
  • 5. DataWeave-Directives Through directives you can define: • DataWeave version • Input types and sources • Output type • Namespaces to import into your transform • Constants that can be referenced throughout the body • Functions that can be called throughout the body
  • 6. DataWeave- Version& Namespace Directive Version Directive: • Through this directive, you specify the version of the DataWeave syntax that is used to interpret the transformation. %dw1.0 Namespace Directive: • This directive associates an alias with its subsequent URI. The directive is relevant only when either the input or the output is of type XML. %namespace ns0 http://www.mulesoft.com/anypoint/SOA/message/v1
  • 7. DataWeave-Input & Output Directive When using DataWeave in Anypoint Studio, it’s not necessary to declare input directives for any of the components of the Mule Message that arrive at the DataWeave transformer (Payload, flow variables, and input/outbound properties) nor for any system variables. These are already implicitly recognized as inputs and can be referenced anywhere in the DataWeave body without a need to include them in the header because their type is known from the Mule metadata. Inputs are declared by assigning a name and a content type. %input payload application/xml Valid types are: application/json, application/xml, application/java, application/csv, application/dw, text/json, text/xml, text/csv
  • 8. DataWeave-Input & Output Directive(cont..) The Output Directive specifies what the output type is in a transformation, which is specified using content/type. Only one output can be specified, the structure of this output is then defined in the DataWeave body. %output application/xml Valid types are: application/json, application/xml, application/java, application/csv, application/dw, text/json, text/xml, text/csv