SlideShare a Scribd company logo
Mule ESB
How to convert from CSV to Json in 5 minutes
Gennaro Spagnoli - 2016
Gennaro Spagnoli - 2016
In this tutorial we will be creating an easy csv to json converter using mule esb.
Let’s begin creating a simple flow with file reader component, in order to trigger the
transformation:
Now let’s create a csv file under the folder src/main/resources/input named test.csv in this
way:
Gennaro Spagnoli - 2016
Now it’s time to configure the File component to read the csv file just created:
Let’s recall that Polling Frequency is the interval
of polling the input path (in millliseconds)
Now we are ready to put the transformation using the DataWeave component
Click on the «Edit sample data» button and paste the content of
the csv file in order to see the preview, not before having set the
output to application/json and made the payload the output:
Gennaro Spagnoli - 2016
Finally, put an Object to String transformer and a Logger to see the results:
[[db_test].converter_testFlow.stage1.02] org.mule.api.processor.LoggerMessageProcessor: [
{
"Billing Street": "111 Boulevard Hausmann",
"Billing City": "Paris",
"Billing Country": "France",
"Billing State": "",
"Name": "Dog Park Industries",
"BillingPostalCode": "75008"
},
{
"Billing Street": "400 South St",
"Billing City": "San Francisco",
"Billing Country": "USA",
"Billing State": "CA",
"Name": "Iguana Park Industries",
"BillingPostalCode": "91156"
},
{
"Billing Street": "777 North St",
"Billing City": "San Francisco",
"Billing Country": "USA",
"Billing State": "CA",
"Name": "Cat Park Industries",
"BillingPostalCode": "91156"
}
]

More Related Content

Viewers also liked (11)

PPTX
Demo on Mule ESB Facebook Connector
Rupesh Sinha
 
PPTX
Timer Interceptor in Mule
Anirban Sen Chowdhary
 
PPTX
Mule esb transformers
Mani Rathnam Gudi
 
PPTX
Mule Expression language
Mani Rathnam Gudi
 
PPTX
Mule ESB Training
Attune University
 
PPT
Mulesoft ppt
Achyuta Lakshmi
 
PDF
Future of Integration | MuleSoft
MuleSoft
 
PPTX
Mule ESB Tutorial Part 1
Srikanth N
 
PPTX
Microservices Best Practices
MuleSoft
 
PDF
Mule ESB Fundamentals
Naresh Chintalcheru
 
PDF
Mule ESB - Integration Simplified
Rich Software
 
Demo on Mule ESB Facebook Connector
Rupesh Sinha
 
Timer Interceptor in Mule
Anirban Sen Chowdhary
 
Mule esb transformers
Mani Rathnam Gudi
 
Mule Expression language
Mani Rathnam Gudi
 
Mule ESB Training
Attune University
 
Mulesoft ppt
Achyuta Lakshmi
 
Future of Integration | MuleSoft
MuleSoft
 
Mule ESB Tutorial Part 1
Srikanth N
 
Microservices Best Practices
MuleSoft
 
Mule ESB Fundamentals
Naresh Chintalcheru
 
Mule ESB - Integration Simplified
Rich Software
 

Similar to Mule esb How to convert from CSV to Json in 5 minutes (10)

PPTX
Mule esb csv_to_json
Davide Rapacciuolo
 
PPTX
Csv to json transform in simple steps
Rahul Kumar
 
PPTX
Mule esb How to convert from Object to Json in 5 minutes
Gennaro Spagnoli
 
PPTX
Mule esb - How to convert from Json to Object in 5 minutes
Gennaro Spagnoli
 
PPTX
Mule esb json_to_object
Davide Rapacciuolo
 
PPTX
Mule esb object_to_json
Davide Rapacciuolo
 
PPTX
Mule esb object_to_json
Davide Rapacciuolo
 
PPTX
Muleesbobjecttojson
Davide Rapacciuolo
 
PPTX
Mule esb flat file –json
Sandeep Mekala
 
PPTX
Mule esb How to convert from Json to Xml in 5 minutes
Gennaro Spagnoli
 
Mule esb csv_to_json
Davide Rapacciuolo
 
Csv to json transform in simple steps
Rahul Kumar
 
Mule esb How to convert from Object to Json in 5 minutes
Gennaro Spagnoli
 
Mule esb - How to convert from Json to Object in 5 minutes
Gennaro Spagnoli
 
Mule esb json_to_object
Davide Rapacciuolo
 
Mule esb object_to_json
Davide Rapacciuolo
 
Mule esb object_to_json
Davide Rapacciuolo
 
Muleesbobjecttojson
Davide Rapacciuolo
 
Mule esb flat file –json
Sandeep Mekala
 
Mule esb How to convert from Json to Xml in 5 minutes
Gennaro Spagnoli
 
Ad

More from Gennaro Spagnoli (8)

PPTX
Mule esb How to use Collection Splitter in 5 minutes
Gennaro Spagnoli
 
PPTX
Mule esb - How to use Idempotent Filters in 5 minutes
Gennaro Spagnoli
 
PPTX
Mule esb How to use Jackson in Json to Object converter
Gennaro Spagnoli
 
PPTX
Mule ESB - How to convert from Xml to Json in 5 minutes
Gennaro Spagnoli
 
PPTX
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
Gennaro Spagnoli
 
PPTX
Mule esb - How to connect to a MySql Database in 5 minutes
Gennaro Spagnoli
 
PPTX
Mule esb soap_service
Gennaro Spagnoli
 
PPTX
Mule esb
Gennaro Spagnoli
 
Mule esb How to use Collection Splitter in 5 minutes
Gennaro Spagnoli
 
Mule esb - How to use Idempotent Filters in 5 minutes
Gennaro Spagnoli
 
Mule esb How to use Jackson in Json to Object converter
Gennaro Spagnoli
 
Mule ESB - How to convert from Xml to Json in 5 minutes
Gennaro Spagnoli
 
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
Gennaro Spagnoli
 
Mule esb - How to connect to a MySql Database in 5 minutes
Gennaro Spagnoli
 
Mule esb soap_service
Gennaro Spagnoli
 
Ad

Recently uploaded (20)

PDF
Build Fast, Scale Faster: Milvus vs. Zilliz Cloud for Production-Ready AI
Zilliz
 
PDF
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
PPTX
Softuni - Psychology of entrepreneurship
Kalin Karakehayov
 
PPTX
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
PDF
The Internet - By the numbers, presented at npNOG 11
APNIC
 
PPTX
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
PPTX
internet básico presentacion es una red global
70965857
 
DOCX
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
PPTX
Orchestrating things in Angular application
Peter Abraham
 
PPT
Agilent Optoelectronic Solutions for Mobile Application
andreashenniger2
 
PPTX
L1A Season 1 Guide made by A hegy Eng Grammar fixed
toszolder91
 
PPTX
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
PDF
BRKACI-1001 - Your First 7 Days of ACI.pdf
fcesargonca
 
PDF
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
PPTX
Presentation3gsgsgsgsdfgadgsfgfgsfgagsfgsfgzfdgsdgs.pptx
SUB03
 
PDF
The-Hidden-Dangers-of-Skipping-Penetration-Testing.pdf.pdf
naksh4thra
 
PPT
introduction to networking with basics coverage
RamananMuthukrishnan
 
PPTX
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
PPTX
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
PPTX
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
Build Fast, Scale Faster: Milvus vs. Zilliz Cloud for Production-Ready AI
Zilliz
 
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
Softuni - Psychology of entrepreneurship
Kalin Karakehayov
 
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
The Internet - By the numbers, presented at npNOG 11
APNIC
 
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
internet básico presentacion es una red global
70965857
 
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
Orchestrating things in Angular application
Peter Abraham
 
Agilent Optoelectronic Solutions for Mobile Application
andreashenniger2
 
L1A Season 1 Guide made by A hegy Eng Grammar fixed
toszolder91
 
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
BRKACI-1001 - Your First 7 Days of ACI.pdf
fcesargonca
 
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
Presentation3gsgsgsgsdfgadgsfgfgsfgagsfgsfgzfdgsdgs.pptx
SUB03
 
The-Hidden-Dangers-of-Skipping-Penetration-Testing.pdf.pdf
naksh4thra
 
introduction to networking with basics coverage
RamananMuthukrishnan
 
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 

Mule esb How to convert from CSV to Json in 5 minutes

  • 1. Mule ESB How to convert from CSV to Json in 5 minutes Gennaro Spagnoli - 2016
  • 2. Gennaro Spagnoli - 2016 In this tutorial we will be creating an easy csv to json converter using mule esb. Let’s begin creating a simple flow with file reader component, in order to trigger the transformation: Now let’s create a csv file under the folder src/main/resources/input named test.csv in this way:
  • 3. Gennaro Spagnoli - 2016 Now it’s time to configure the File component to read the csv file just created: Let’s recall that Polling Frequency is the interval of polling the input path (in millliseconds) Now we are ready to put the transformation using the DataWeave component Click on the «Edit sample data» button and paste the content of the csv file in order to see the preview, not before having set the output to application/json and made the payload the output:
  • 4. Gennaro Spagnoli - 2016 Finally, put an Object to String transformer and a Logger to see the results: [[db_test].converter_testFlow.stage1.02] org.mule.api.processor.LoggerMessageProcessor: [ { "Billing Street": "111 Boulevard Hausmann", "Billing City": "Paris", "Billing Country": "France", "Billing State": "", "Name": "Dog Park Industries", "BillingPostalCode": "75008" }, { "Billing Street": "400 South St", "Billing City": "San Francisco", "Billing Country": "USA", "Billing State": "CA", "Name": "Iguana Park Industries", "BillingPostalCode": "91156" }, { "Billing Street": "777 North St", "Billing City": "San Francisco", "Billing Country": "USA", "Billing State": "CA", "Name": "Cat Park Industries", "BillingPostalCode": "91156" } ]