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

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

Viewers also liked (11)

Demo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook ConnectorDemo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook Connector
 
Timer Interceptor in Mule
Timer Interceptor in MuleTimer Interceptor in Mule
Timer Interceptor in Mule
 
Mule esb transformers
Mule esb transformersMule esb transformers
Mule esb transformers
 
Mule Expression language
Mule Expression languageMule Expression language
Mule Expression language
 
Mule ESB Training
Mule ESB TrainingMule ESB Training
Mule ESB Training
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Future of Integration | MuleSoft
Future of Integration | MuleSoftFuture of Integration | MuleSoft
Future of Integration | MuleSoft
 
Mule ESB Tutorial Part 1
Mule ESB Tutorial Part 1Mule ESB Tutorial Part 1
Mule ESB Tutorial Part 1
 
Microservices Best Practices
Microservices Best Practices Microservices Best Practices
Microservices Best Practices
 
Mule ESB Fundamentals
Mule ESB FundamentalsMule ESB Fundamentals
Mule ESB Fundamentals
 
Mule ESB - Integration Simplified
Mule ESB - Integration SimplifiedMule ESB - Integration Simplified
Mule ESB - Integration Simplified
 

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

Mule esb csv_to_json
Mule esb csv_to_jsonMule esb csv_to_json
Mule esb csv_to_json
Davide Rapacciuolo
 
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutesMule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutes
Gennaro Spagnoli
 
Custom Interface to Ebsco A to Z
Custom Interface to Ebsco A to ZCustom Interface to Ebsco A to Z
Custom Interface to Ebsco A to Z
NASIG
 
Mule esb soap_service
Mule esb soap_serviceMule esb soap_service
Mule esb soap_service
Gennaro Spagnoli
 
Dataweave Basic
Dataweave BasicDataweave Basic
Dataweave Basic
Nishant Kumar
 
Data weave
Data weave Data weave
Data weave
princeirfancivil
 
Data weave
Data weave Data weave
Data weave
Phaniu
 
Dataweave
Dataweave Dataweave
Dataweave
Praneethchampion
 
Data weave
Data weave Data weave
Data weave
irfan1008
 
Data weave
Data weave Data weave
Data weave
mdfkhan625
 
Data weave
Data weaveData weave
Data weave
manavp
 
A guide to EPiServer CMS Scheduled Job
A guide to EPiServer CMS Scheduled JobA guide to EPiServer CMS Scheduled Job
A guide to EPiServer CMS Scheduled Job
Paul Graham
 
Data weave in Mule
Data weave in MuleData weave in Mule
Data weave in Mule
RaviShankar Mishra
 
Data weave
Data weaveData weave
Data weave
Adithya-kuchan
 
Dataweave by nagarjuna
Dataweave  by nagarjunaDataweave  by nagarjuna
Dataweave by nagarjuna
Nagarjuna reddy
 
Data weave
Data weave Data weave
Data weave
Khasim Saheb
 
Data weave
Data weave Data weave
Data weave
Anand kalla
 
Data weave
Data weave Data weave
Data weave
Sunil Komarapu
 
Data weave
Data weave Data weave
Data weave
Khan625
 
Data weave
Data weaveData weave
Data weave
himajareddys
 

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

Mule esb csv_to_json
Mule esb csv_to_jsonMule esb csv_to_json
Mule esb csv_to_json
 
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutesMule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutes
 
Custom Interface to Ebsco A to Z
Custom Interface to Ebsco A to ZCustom Interface to Ebsco A to Z
Custom Interface to Ebsco A to Z
 
Mule esb soap_service
Mule esb soap_serviceMule esb soap_service
Mule esb soap_service
 
Dataweave Basic
Dataweave BasicDataweave Basic
Dataweave Basic
 
Data weave
Data weave Data 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 weaveData weave
Data weave
 
A guide to EPiServer CMS Scheduled Job
A guide to EPiServer CMS Scheduled JobA guide to EPiServer CMS Scheduled Job
A guide to EPiServer CMS Scheduled Job
 
Data weave in Mule
Data weave in MuleData weave in Mule
Data weave in Mule
 
Data weave
Data weaveData weave
Data weave
 
Dataweave by nagarjuna
Dataweave  by nagarjunaDataweave  by nagarjuna
Dataweave by nagarjuna
 
Data weave
Data weave Data weave
Data weave
 
Data weave
Data weave Data weave
Data weave
 
Data weave
Data weave Data weave
Data weave
 
Data weave
Data weave Data weave
Data weave
 
Data weave
Data weaveData weave
Data weave
 

More from Gennaro Spagnoli

Mule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutesMule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutes
Gennaro Spagnoli
 
Mule esb - How to use Idempotent Filters in 5 minutes
Mule esb - How to use Idempotent Filters in 5 minutesMule esb - How to use Idempotent Filters in 5 minutes
Mule esb - How to use Idempotent Filters in 5 minutes
Gennaro Spagnoli
 
Mule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converterMule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converter
Gennaro Spagnoli
 
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutesMule esb How to convert from Object to Json in 5 minutes
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
Mule esb - How to convert from Json to Object in 5 minutesMule esb - How to convert from Json to Object in 5 minutes
Mule esb - How to convert from Json to Object in 5 minutes
Gennaro Spagnoli
 
Mule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutesMule ESB - How to convert from Xml to Json in 5 minutes
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
Mule esb - How to make CRUD operations to a MySql Database in 5 minutesMule esb - How to make CRUD operations to a MySql Database in 5 minutes
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
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutes
Gennaro Spagnoli
 
Mule esb
Mule esbMule esb

More from Gennaro Spagnoli (9)

Mule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutesMule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutes
 
Mule esb - How to use Idempotent Filters in 5 minutes
Mule esb - How to use Idempotent Filters in 5 minutesMule esb - How to use Idempotent Filters in 5 minutes
Mule esb - How to use Idempotent Filters in 5 minutes
 
Mule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converterMule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converter
 
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutesMule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutes
 
Mule esb - How to convert from Json to Object in 5 minutes
Mule esb - How to convert from Json to Object in 5 minutesMule esb - How to convert from Json to Object in 5 minutes
Mule esb - How to convert from Json to Object in 5 minutes
 
Mule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutesMule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutes
 
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
Mule esb - How to make CRUD operations to a MySql Database in 5 minutesMule esb - How to make CRUD operations to a MySql Database in 5 minutes
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutes
 
Mule esb
Mule esbMule esb
Mule esb
 

Recently uploaded

急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
JeyaPerumal1
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 

Recently uploaded (20)

急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 

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" } ]