Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Dataweave_library_extension.pdf

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 24 Anzeige
Anzeige

Weitere Verwandte Inhalte

Aktuellste (20)

Anzeige

Dataweave_library_extension.pdf

  1. 1. Patna MuleSoft Meetup Group (10th Meetup) DataWeave Extension Library 19th June 2022
  2. 2. Organizer About: ● Working as Solution Architect at Apisero Inc. ● 11 + year of Total IT Experience. 5+ years in Mulesoft. ● Certified MuleSoft Developer and Architect. ● Mulesoft Leader and Mentor Amit Mohan
  3. 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. 4. A recording of this meetup will be uploaded to events page within 24 hours. Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab. Make it more Interactive!!! Give us feedback! Rate this meetup session by filling feedback form at the end of the day. We Love Feedbacks!!! Its Bread & Butter for Meetup. Housekeeping 4
  5. 5. Speaker Shyam Raj Prasad Senior Principal Engineer Tricon Infotech Private Limited About: ● Working as Senior Principal Engineer at Tricon Infotech Private Limited. ● 12+ years of Total Experience. ● 4+ years experience in Mulesoft. ● Certified MuleSoft Developer and Architect.
  6. 6. 6 Agenda ● DataWeave ● DataWeave Library Extension ● Development of DataWeave library ● Features of Dataweave Library extension ● Packaging and deployment of DataWeave Library ● Demo
  7. 7. ● DataWeave is the 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. 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. 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. 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. 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. 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. 13 DataWeave Library Extension Features: Auto Completion
  14. 14. 14 DataWeave Library Extension Features: Live preview
  15. 15. 15 DataWeave Library Extension Features: Testing
  16. 16. 16 DataWeave Library Extension Features: Debugging
  17. 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. 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. 19. Demo
  20. 20. Q&A
  21. 21. Take a stand ! 21 ● Nominate yourself for the next meetup speaker and suggest a topic as well.
  22. 22. Get ready to WIN a Special Gift from MuleSoft Community Quiz Time
  23. 23. 23 ● Share: ○ Tweet using the hashtag #MuleSoftMeetups ○ Invite your network to join: https://meetups.mulesoft.com/patna/ ● 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?
  24. 24. Thank you

×