SlideShare a Scribd company logo
1 of 23
Mar 3, 2023 4:00 PM IST
Bangalore MuleSoft Meetup
Group Present’s # 20
DataWeave Extension Library
Organizer
About:
● Mulesoft Meetup Leader
● Working as MuleSoft Developer & Administrator @
Salesforce.
● 5+ years of Experience.
● Certified MuleSoft Developer and Architect.
● Bangalore and Hyderabad Meetup Leader
Bharath Kumar NJ,
AMTS, Salesforce
Safe Harbour Statement
● Both the speaker and the host are organizing this meet-up in individual capacity only. We are
not representing our companies here.
● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any
responsibility that same solution will work for your business requirements.
● This presentation is not meant for any promotional activities.
3
A recording of this meetup will be uploaded to events page within 72 hours.
Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab.
Make it more Interactive!!!
Share us the feedback! Rate this meetup session by filling feedback form at the end of the day.
We Love Feedbacks !!
Housekeeping
4
About the Speaker :
Introductions
Shyam Raj Prasad,
Senior Principal Engineer,
Tricon Infotech Private Limited
5
● Working as Senior Principal Engineer at Tricon Infotech
Private Limited.
● 13+ years of Total Experience.
● 5+ years experience in Mulesoft.
● Certified MuleSoft Developer and Architect.
● MuleSoft Mentor
● Patna MuleSoft Meetup Leader
● Top Contributors of MuleSoft Help Forum
● Founder of DataWeave Fun
6
Agenda
●DataWeave
●DataWeave Library Extension
●Development of DataWeave library
●Features of Dataweave Library extension
●Packaging and deployment of DataWeave Library
●Demo
● DataWeave is the functional programming language designed by MuleSoft for data transformation.
● DataWeave enables you to build a simple solution for a common use case for integration developers:
read and parse data from one format, transform the data, and write it out as a different format.
● For example, a DataWeave script can receive a CSV file as input and transform it into an array of
complex JSON objects, or receive an XML input and write the data out to a flat file format.
DataWeave Language
The DataWeave extension to Visual Studio Code enhances productivity when you are building
DataWeave libraries. The extension provides the following capabilities:
● Ability to work on your DataWeave modules and mappings in a standalone manner, outside of a Mule
application.
● Instant execution of your DataWeave mappings, including live preview of data transformations.
● Language support, including autocompletion, navigation, refactoring, formatting, quick fixes, and
syntax highlighting.
● Debugging support for DataWeave mappings.
● Automatic generation of a documentation template that you can use to provide your own DataWeave
library documentation in Exchange.
● An embedded DataWeave Maven plugin with the following features:
○ Integration of packaging and deployment of your DataWeave libraries with your Maven lifecycle.
○ Integration with Exchange to share and consume DataWeave libraries.
● An embedded DataWeave testing framework that enables you to build automated unit and integration
tests easily.
DataWeave Library Extension
9
Requirements
● Java 8 or 11 provided
● Apache Maven (3.6.3 minimum)
● Microsoft Visual Studio Code for your specific operating system
● DataWeave 2.0 (BETA) library in VS code (Extensions tab)
10
Developing DataWeave Libraries
A DataWeave library is a reusable package of DataWeave module and mapping files, and
resource files, such as JSON, XML, and CSV. To develop DataWeave libraries, first create
a new DataWeave project in Visual Studio Code where you then create, preview, and test
custom mappings and modules.
If you want to try out your mapping without creating a DataWeave project, you can either
open your .dwl mapping file directly in Visual Studio Code or create a new one and use
sample data and scenarios.
DataWeave Modules and Mapping
● Dataweave modules can define functions, variables, types, and namespaces. You can import
these modules into a DataWeave script to use the features.
● Dataweave module cannot contain an output directive, body expression, or the separator (---)
between header and body sections.
● Dataweave mapping files are a type of module that contains a complete DataWeave script
that you can import and use in another DataWeave script or reference in a Mule component.
11
12
Understanding the DataWeave Project
Structure
DataWeave projects use Apache Maven to build and declare project dependencies. The following
diagram shows the DataWeave project structure:
13
DataWeave Library Extension Features:
Auto Completion
14
DataWeave Library Extension Features:
Live preview
15
DataWeave Library Extension Features:
Testing
16
DataWeave Library Extension Features:
Debugging
17
DataWeave Library Extension Features
● Validation
● Hover
● Extract variable
● Goto definition
● Document symbols
● Formatting
● Find references
● Highlight
● Rename symbol
● Quick fixes
● Docs auto-generation
● Dependency management
18
Packaging and Deploying DataWeave
Libraries
Apache Maven plugin for DataWeave to integrate the packaging and deployment of your
DataWeave libraries with your Maven lifecycle. The plugin enables you to run six main
goals:
● compile Compiles the source code for your DataWeave library.
● test Tests the compiled source code using the DataWeave testing framework.
● data-weave:generate-docs Automatically generates the documentation for your
DataWeave library.
● package : Packages the compiled code in a .jar file.
● data-weave:deploy-docs :Uploads the auto-generated documentation for your
DataWeave library to Anypoint Exchange.
● deploy :Automatically uploads your DataWeave library to the deployment target and
uploads the auto-generated documentation to Exchange.
Demo
Q&A
Take a stand !
21
●Nominate yourself for the next meetup speaker
https://sfdc.co/hyd-meetup-nomination
22
● Share:
○ Tweet using the hashtag #MuleSoftMeetups #MuleSoftCommunity
○ Join Bangalore Group: https://meetups.mulesoft.com/bangalore
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
What’s next?
Thank You

More Related Content

Similar to DataWeave Extension Library

Anypointconnectordevkit 160816041722
Anypointconnectordevkit 160816041722Anypointconnectordevkit 160816041722
Anypointconnectordevkit 160816041722ppts123456
 
1 - Introduction of Azure DevOps
1 - Introduction of Azure DevOps1 - Introduction of Azure DevOps
1 - Introduction of Azure DevOpsBhaumik Patel
 
Doing data visualizations with tableau
Doing data visualizations with tableauDoing data visualizations with tableau
Doing data visualizations with tableauRay Schwartz
 
Asp Net Vs Vue JS Which One You Should Choose for Development.pdf
Asp Net Vs Vue JS Which One You Should Choose for Development.pdfAsp Net Vs Vue JS Which One You Should Choose for Development.pdf
Asp Net Vs Vue JS Which One You Should Choose for Development.pdfIntegrated IT Solutions
 
Apoyo en la administración de bases de datos mediante microsoft data tools
Apoyo en la administración de bases de datos mediante microsoft data toolsApoyo en la administración de bases de datos mediante microsoft data tools
Apoyo en la administración de bases de datos mediante microsoft data toolsSpanishPASSVC
 
Azure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalAzure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalSarah Dutkiewicz
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoftvenkata20k
 
Database CI Demo Using Sql Server
Database CI  Demo Using Sql ServerDatabase CI  Demo Using Sql Server
Database CI Demo Using Sql ServerUmesh Kumar
 
Database synchronization prashant parit
Database synchronization   prashant paritDatabase synchronization   prashant parit
Database synchronization prashant paritPrashantP23
 
Mule anypoint connector
Mule  anypoint connectorMule  anypoint connector
Mule anypoint connectorD.Rajesh Kumar
 
Mule anypoint connector dev kit
Mule  anypoint connector dev kitMule  anypoint connector dev kit
Mule anypoint connector dev kitD.Rajesh Kumar
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development ToolsSofiaCarter4
 

Similar to DataWeave Extension Library (20)

Data virtualization using polybase
Data virtualization using polybaseData virtualization using polybase
Data virtualization using polybase
 
Anypointconnectordevkit 160816041722
Anypointconnectordevkit 160816041722Anypointconnectordevkit 160816041722
Anypointconnectordevkit 160816041722
 
Asp.net Vs Vue.js.pdf
Asp.net Vs Vue.js.pdfAsp.net Vs Vue.js.pdf
Asp.net Vs Vue.js.pdf
 
1 - Introduction of Azure DevOps
1 - Introduction of Azure DevOps1 - Introduction of Azure DevOps
1 - Introduction of Azure DevOps
 
Azure rev002
Azure rev002Azure rev002
Azure rev002
 
Doing data visualizations with tableau
Doing data visualizations with tableauDoing data visualizations with tableau
Doing data visualizations with tableau
 
Asp Net Vs Vue JS Which One You Should Choose for Development.pdf
Asp Net Vs Vue JS Which One You Should Choose for Development.pdfAsp Net Vs Vue JS Which One You Should Choose for Development.pdf
Asp Net Vs Vue JS Which One You Should Choose for Development.pdf
 
Apoyo en la administración de bases de datos mediante microsoft data tools
Apoyo en la administración de bases de datos mediante microsoft data toolsApoyo en la administración de bases de datos mediante microsoft data tools
Apoyo en la administración de bases de datos mediante microsoft data tools
 
Azure DevOps for the Data Professional
Azure DevOps for the Data ProfessionalAzure DevOps for the Data Professional
Azure DevOps for the Data Professional
 
NodeJs Frameworks.pdf
NodeJs Frameworks.pdfNodeJs Frameworks.pdf
NodeJs Frameworks.pdf
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
 
Database CI Demo Using Sql Server
Database CI  Demo Using Sql ServerDatabase CI  Demo Using Sql Server
Database CI Demo Using Sql Server
 
Database synchronization prashant parit
Database synchronization   prashant paritDatabase synchronization   prashant parit
Database synchronization prashant parit
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
SSDT unleashed
SSDT unleashedSSDT unleashed
SSDT unleashed
 
Azure Devops
Azure DevopsAzure Devops
Azure Devops
 
Mule tcat server
Mule  tcat serverMule  tcat server
Mule tcat server
 
Mule anypoint connector
Mule  anypoint connectorMule  anypoint connector
Mule anypoint connector
 
Mule anypoint connector dev kit
Mule  anypoint connector dev kitMule  anypoint connector dev kit
Mule anypoint connector dev kit
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
 

More from MuleSoft Meetups

MuleSoft + Augmented Reality & ChatGPT
MuleSoft + Augmented Reality & ChatGPTMuleSoft + Augmented Reality & ChatGPT
MuleSoft + Augmented Reality & ChatGPTMuleSoft Meetups
 
Anypoint API Manager Custom Policies & Best Practices
Anypoint API Manager Custom Policies & Best PracticesAnypoint API Manager Custom Policies & Best Practices
Anypoint API Manager Custom Policies & Best PracticesMuleSoft Meetups
 
Anypoint Custom Metrics Mastery
Anypoint Custom Metrics MasteryAnypoint Custom Metrics Mastery
Anypoint Custom Metrics MasteryMuleSoft Meetups
 
MuleSoft + Augmented Reality & ChatGPT
MuleSoft + Augmented Reality & ChatGPTMuleSoft + Augmented Reality & ChatGPT
MuleSoft + Augmented Reality & ChatGPTMuleSoft Meetups
 

More from MuleSoft Meetups (6)

The ins and outs of RAML
The ins and outs of RAMLThe ins and outs of RAML
The ins and outs of RAML
 
MuleSoft + Augmented Reality & ChatGPT
MuleSoft + Augmented Reality & ChatGPTMuleSoft + Augmented Reality & ChatGPT
MuleSoft + Augmented Reality & ChatGPT
 
Anypoint API Manager Custom Policies & Best Practices
Anypoint API Manager Custom Policies & Best PracticesAnypoint API Manager Custom Policies & Best Practices
Anypoint API Manager Custom Policies & Best Practices
 
API LifeCycle Management
API LifeCycle ManagementAPI LifeCycle Management
API LifeCycle Management
 
Anypoint Custom Metrics Mastery
Anypoint Custom Metrics MasteryAnypoint Custom Metrics Mastery
Anypoint Custom Metrics Mastery
 
MuleSoft + Augmented Reality & ChatGPT
MuleSoft + Augmented Reality & ChatGPTMuleSoft + Augmented Reality & ChatGPT
MuleSoft + Augmented Reality & ChatGPT
 

Recently uploaded

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

DataWeave Extension Library

  • 1. Mar 3, 2023 4:00 PM IST Bangalore MuleSoft Meetup Group Present’s # 20 DataWeave Extension Library
  • 2. Organizer About: ● Mulesoft Meetup Leader ● Working as MuleSoft Developer & Administrator @ Salesforce. ● 5+ years of Experience. ● Certified MuleSoft Developer and Architect. ● Bangalore and Hyderabad Meetup Leader Bharath Kumar NJ, AMTS, Salesforce
  • 3. Safe Harbour Statement ● Both the speaker and the host are organizing this meet-up in individual capacity only. We are not representing our companies here. ● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any responsibility that same solution will work for your business requirements. ● This presentation is not meant for any promotional activities. 3
  • 4. A recording of this meetup will be uploaded to events page within 72 hours. Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab. Make it more Interactive!!! Share us the feedback! Rate this meetup session by filling feedback form at the end of the day. We Love Feedbacks !! Housekeeping 4
  • 5. About the Speaker : Introductions Shyam Raj Prasad, Senior Principal Engineer, Tricon Infotech Private Limited 5 ● Working as Senior Principal Engineer at Tricon Infotech Private Limited. ● 13+ years of Total Experience. ● 5+ years experience in Mulesoft. ● Certified MuleSoft Developer and Architect. ● MuleSoft Mentor ● Patna MuleSoft Meetup Leader ● Top Contributors of MuleSoft Help Forum ● Founder of DataWeave Fun
  • 6. 6 Agenda ●DataWeave ●DataWeave Library Extension ●Development of DataWeave library ●Features of Dataweave Library extension ●Packaging and deployment of DataWeave Library ●Demo
  • 7. ● DataWeave is the functional programming language designed by MuleSoft for data transformation. ● DataWeave enables you to build a simple solution for a common use case for integration developers: read and parse data from one format, transform the data, and write it out as a different format. ● For example, a DataWeave script can receive a CSV file as input and transform it into an array of complex JSON objects, or receive an XML input and write the data out to a flat file format. DataWeave Language
  • 8. The DataWeave extension to Visual Studio Code enhances productivity when you are building DataWeave libraries. The extension provides the following capabilities: ● Ability to work on your DataWeave modules and mappings in a standalone manner, outside of a Mule application. ● Instant execution of your DataWeave mappings, including live preview of data transformations. ● Language support, including autocompletion, navigation, refactoring, formatting, quick fixes, and syntax highlighting. ● Debugging support for DataWeave mappings. ● Automatic generation of a documentation template that you can use to provide your own DataWeave library documentation in Exchange. ● An embedded DataWeave Maven plugin with the following features: ○ Integration of packaging and deployment of your DataWeave libraries with your Maven lifecycle. ○ Integration with Exchange to share and consume DataWeave libraries. ● An embedded DataWeave testing framework that enables you to build automated unit and integration tests easily. DataWeave Library Extension
  • 9. 9 Requirements ● Java 8 or 11 provided ● Apache Maven (3.6.3 minimum) ● Microsoft Visual Studio Code for your specific operating system ● DataWeave 2.0 (BETA) library in VS code (Extensions tab)
  • 10. 10 Developing DataWeave Libraries A DataWeave library is a reusable package of DataWeave module and mapping files, and resource files, such as JSON, XML, and CSV. To develop DataWeave libraries, first create a new DataWeave project in Visual Studio Code where you then create, preview, and test custom mappings and modules. If you want to try out your mapping without creating a DataWeave project, you can either open your .dwl mapping file directly in Visual Studio Code or create a new one and use sample data and scenarios.
  • 11. DataWeave Modules and Mapping ● Dataweave modules can define functions, variables, types, and namespaces. You can import these modules into a DataWeave script to use the features. ● Dataweave module cannot contain an output directive, body expression, or the separator (---) between header and body sections. ● Dataweave mapping files are a type of module that contains a complete DataWeave script that you can import and use in another DataWeave script or reference in a Mule component. 11
  • 12. 12 Understanding the DataWeave Project Structure DataWeave projects use Apache Maven to build and declare project dependencies. The following diagram shows the DataWeave project structure:
  • 13. 13 DataWeave Library Extension Features: Auto Completion
  • 14. 14 DataWeave Library Extension Features: Live preview
  • 15. 15 DataWeave Library Extension Features: Testing
  • 16. 16 DataWeave Library Extension Features: Debugging
  • 17. 17 DataWeave Library Extension Features ● Validation ● Hover ● Extract variable ● Goto definition ● Document symbols ● Formatting ● Find references ● Highlight ● Rename symbol ● Quick fixes ● Docs auto-generation ● Dependency management
  • 18. 18 Packaging and Deploying DataWeave Libraries Apache Maven plugin for DataWeave to integrate the packaging and deployment of your DataWeave libraries with your Maven lifecycle. The plugin enables you to run six main goals: ● compile Compiles the source code for your DataWeave library. ● test Tests the compiled source code using the DataWeave testing framework. ● data-weave:generate-docs Automatically generates the documentation for your DataWeave library. ● package : Packages the compiled code in a .jar file. ● data-weave:deploy-docs :Uploads the auto-generated documentation for your DataWeave library to Anypoint Exchange. ● deploy :Automatically uploads your DataWeave library to the deployment target and uploads the auto-generated documentation to Exchange.
  • 19. Demo
  • 20. Q&A
  • 21. Take a stand ! 21 ●Nominate yourself for the next meetup speaker https://sfdc.co/hyd-meetup-nomination
  • 22. 22 ● Share: ○ Tweet using the hashtag #MuleSoftMeetups #MuleSoftCommunity ○ Join Bangalore Group: https://meetups.mulesoft.com/bangalore ● Feedback: ○ Fill out the survey feedback and suggest topics for upcoming events ○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program What’s next?