SlideShare a Scribd company logo
1 of 12
1) First configure the ‘HTTP’ connector as a source in Anypoint Studio Mule.
2) Drag & Drop the ‘Transform Message’ from the Mule palette window for
conversion.
3) In the Transform Message as input metadata provide copybook schema at
the same time as output metadata provide JSON Data. Because of Flatfile –
JSON conversion using copybook schema.
4) Drag & Drop ‘Byte Array to String’ Transformer from Mule Palette window
for converting result into string.
5) Finally use the Logger for logging the result message.
Note:
Find the Sample Copybook & JSON Data in the next slides.
000000 01 HospitalsCopyBook.
000100 02 Hospitals.
000200 03 Basic-Info.
000300 05 Name PIC X(4).
000400 05 Address PIC XXXX.
000500 05 Phone-Number PIC 9(10).
000600 05 Admin PIC XXXX.
000700* Ward Information
000800 02 Wards.
000900 03 Basic-Info.
001000 05 Name PIC XXXX.
001100 05 Address PIC X(4).
001200 05 Number PIC 9999999999.
001300 05 Admin PIC X(4).
001400* Patient Information
001500 02 Patients.
001600 03 Basic-Info.
001700 05 Name PIC XXXX.
001800 05 Address PIC X(4).
001900 05 Phone-Number PIC 9(10).
002000 05 Blood-Group PIC SX(3).
002100* Symptom Information
002200 02 Symptoms.
002300 03 Basic-Info.
002400 05 Name PIC X(4).
002500 05 Address PIC XXXX.
002600 05 Phone-Number PIC 9(10).
002700 05 Admin PIC XXXX.
002800* Treatment Details
002900 02 Treatments.
003000 03 Basic-Info.
003100 05 Name PIC X(4).
003200 05 Type PIC XXXX.
003300 05 Code PIC 9(10).
003400 05 Amount PIC 999V9.
003500* Doctor Availabilty Info
003600 02 Doctors.
003700 03 Basic-Info.
003800 05 Name PIC X(4).
003900 05 Address PIC XXXX.
004000 05 Phone-Number PIC 9(10).
004100 05 Admin PIC XXXX.
004200* Facilities Availabilty
004300 02 Facilities.
004400 03 Basic-Info.
004500 05 Name PIC X(4).
004600 05 Address PIC XXXX.
004700 05 Phone-Number PIC 9(10).
004800 05 Admin PIC X(4).
[
{
"HospitalsCopyBook": {
"Hospitals": {
"Basic-Info" :
{
"Name" : "AA",
"Address" : "HYD",
"Phone-Number" : 1111111111,
"Admin" : "ABCD"
}
},
"Wards": {
"Basic-Info":
{
"Name" : "BB",
"Address" : "BNG",
"Number" : 2222222222,
"Admin" : "XYZA"
}
},
"Patients": {
"Basic-Info":
{
"Name" : "CC",
"Address" : "TPT",
"Phone-Number" : 3333333333,
"Blood-Group" : "+ve"
}
},
"Symptoms": {
"Basic-Info":
{
"Name" : "DD",
"Address" : "KDP",
"Phone-Number" : 4444444444,
"Admin" : "PQRS"
}
},
"Treatments": {
"Basic-Info":
{
"Name" : "EE",
"Type" : "NML",
"Code" : 55555,
"Amount" : 123.4
}
},
"Doctors": {
"Basic-Info":
{
"Name" : "FF",
"Address" : "RJPT",
"Phone-Number" : 6666666666,
"Admin" : "MNOP"
}
},
"Facilities": {
"Basic-Info":
{
"Name" : "GG",
"Address" : "PNGL",
"Phone-Number" : 7777777777,
"Admin" : "KLMN"
}
}
}
}
]
Note: Map field by field in dataweave
AAAABNGL1234567890AAAABBBBHYDB1234567890B
BBBCCCCRJPT1234567890+veDDDDTPTT1234567890
DDDDEEEENMLR123456789012304FFFFPNG123456789
0FFFFGGGGKLMN1234567890GGGG
Mule flatfile-json example

More Related Content

More from Vishnukanth Rachineni

More from Vishnukanth Rachineni (6)

Mule copy book-tutorial
Mule copy book-tutorialMule copy book-tutorial
Mule copy book-tutorial
 
Mule XML java sample
Mule XML java sampleMule XML java sample
Mule XML java sample
 
Munit testing sample
Munit testing sampleMunit testing sample
Munit testing sample
 
Mulesoft devkit connector
Mulesoft devkit connectorMulesoft devkit connector
Mulesoft devkit connector
 
Cache scope sample
Cache scope sampleCache scope sample
Cache scope sample
 
Polling with watermark
Polling with watermarkPolling with watermark
Polling with watermark
 

Recently uploaded

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Recently uploaded (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Mule flatfile-json example

  • 1.
  • 2. 1) First configure the ‘HTTP’ connector as a source in Anypoint Studio Mule. 2) Drag & Drop the ‘Transform Message’ from the Mule palette window for conversion. 3) In the Transform Message as input metadata provide copybook schema at the same time as output metadata provide JSON Data. Because of Flatfile – JSON conversion using copybook schema. 4) Drag & Drop ‘Byte Array to String’ Transformer from Mule Palette window for converting result into string.
  • 3. 5) Finally use the Logger for logging the result message. Note: Find the Sample Copybook & JSON Data in the next slides.
  • 4. 000000 01 HospitalsCopyBook. 000100 02 Hospitals. 000200 03 Basic-Info. 000300 05 Name PIC X(4). 000400 05 Address PIC XXXX. 000500 05 Phone-Number PIC 9(10). 000600 05 Admin PIC XXXX. 000700* Ward Information 000800 02 Wards. 000900 03 Basic-Info. 001000 05 Name PIC XXXX. 001100 05 Address PIC X(4). 001200 05 Number PIC 9999999999. 001300 05 Admin PIC X(4). 001400* Patient Information 001500 02 Patients. 001600 03 Basic-Info. 001700 05 Name PIC XXXX. 001800 05 Address PIC X(4). 001900 05 Phone-Number PIC 9(10). 002000 05 Blood-Group PIC SX(3).
  • 5. 002100* Symptom Information 002200 02 Symptoms. 002300 03 Basic-Info. 002400 05 Name PIC X(4). 002500 05 Address PIC XXXX. 002600 05 Phone-Number PIC 9(10). 002700 05 Admin PIC XXXX. 002800* Treatment Details 002900 02 Treatments. 003000 03 Basic-Info. 003100 05 Name PIC X(4). 003200 05 Type PIC XXXX. 003300 05 Code PIC 9(10). 003400 05 Amount PIC 999V9. 003500* Doctor Availabilty Info 003600 02 Doctors. 003700 03 Basic-Info. 003800 05 Name PIC X(4). 003900 05 Address PIC XXXX. 004000 05 Phone-Number PIC 9(10). 004100 05 Admin PIC XXXX.
  • 6. 004200* Facilities Availabilty 004300 02 Facilities. 004400 03 Basic-Info. 004500 05 Name PIC X(4). 004600 05 Address PIC XXXX. 004700 05 Phone-Number PIC 9(10). 004800 05 Admin PIC X(4).
  • 7. [ { "HospitalsCopyBook": { "Hospitals": { "Basic-Info" : { "Name" : "AA", "Address" : "HYD", "Phone-Number" : 1111111111, "Admin" : "ABCD" } }, "Wards": { "Basic-Info": { "Name" : "BB", "Address" : "BNG", "Number" : 2222222222, "Admin" : "XYZA" } },
  • 8. "Patients": { "Basic-Info": { "Name" : "CC", "Address" : "TPT", "Phone-Number" : 3333333333, "Blood-Group" : "+ve" } }, "Symptoms": { "Basic-Info": { "Name" : "DD", "Address" : "KDP", "Phone-Number" : 4444444444, "Admin" : "PQRS" } }, "Treatments": { "Basic-Info": { "Name" : "EE", "Type" : "NML", "Code" : 55555, "Amount" : 123.4 } },
  • 9. "Doctors": { "Basic-Info": { "Name" : "FF", "Address" : "RJPT", "Phone-Number" : 6666666666, "Admin" : "MNOP" } }, "Facilities": { "Basic-Info": { "Name" : "GG", "Address" : "PNGL", "Phone-Number" : 7777777777, "Admin" : "KLMN" } } } } ] Note: Map field by field in dataweave
  • 10.