SlideShare a Scribd company logo
1 of 19
Download to read offline
MuleSoft Surat Meetup Group
Flat File Schemas Transformation
With MuleSoft
Date – 21ST Dec 2021
Time – 21:00 IST (GMT+05:30)
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.
2
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
3
Organizers
4
Nitish Jain
Jitendra Bafna
Speakers
5
Jitendra Bafna
Senior Solution Architect III
EPAM Systems
➢ Overall 14 years of experience in API and Integration Technologies.
➢ TOGAF 9.2 Certified.
➢ MuleSoft Ambassador and Surat/Nashik MuleSoft Meetup Leader
➢ Published overall 300+ YouTube Videos and 150+ Articles on MuleSoft
and Anypoint Platform.
➢ Expertise in setting up MuleSoft platform includes Hybrid
Implementation, CloudHub (Anypoint VPC, VPN and DLB), Customer
Hosted Mule Runtime (Clustering and Server Group).
➢ Expertise in Application Integration using API Led Connectivity and
Event Driven Architecture.
➢ Expertise in Integration with various systems like Salesforce, NetSuite
ERP, Snowflake, Databases, SAP,
➢ Define Integration and migration strategy and roadmap includes
migrating from on premise to CloudHub, migrating to higher version of
Mule Runtime etc.
➢ Expertise in AWS, OCI.
6
Agenda
Introduction
Flat File – CSV Format
Flat File – Single Segment
Flat File – Multiple Segment
Trivia Quiz
CSV Format
CSV stands for Comma-Separated values.
MIME type: application/csv
The DataWeave reader for CSV input supports the following parsing strategies:
• Indexed
• In-Memory
• Streaming
By Default, CSV reader stores input data from an entire file In-Memory if file is 1.5
MB or less. If the file is larger than 1.5 MB, the process writes the data to disk.
For very large files, you can improve the performance of the reader by setting a
streaming property to true.
CSV Reader
Properties
Properties Description
Data
Type
Default
Value
bodyStartLineNumber Line Number on which body starts. Number 0
escape
Character to use for escaping special characters, such as
separators or quotes. String 
header Indicates whether a CSV header is present. BooleanTRUE
headerLineNumber Line Number on which CSV header located. Number 0
ignoreEmptyLine Indicates whether to ignore empty line. BooleanTRUE
quote Character to used for quotes String "
separator Character for separating one field from another filed String ,
CSV Writer
Properties
Properties Description Data Type
Default
Value
bodyStartLineNumber Line number on which the body starts. Number 0
bufferSize Size of the buffer writer. Number 8192
deferred
Generates the output as a data stream when set to
true, and defers the script’s execution until
consumed. Boolean FALSE
encoding
The character set to use for the output, such as
UTF-8. String null
escape
Character to use for escaping special characters,
such as separators or quotes. String 
header Indicates whether a CSV header is present. Boolean TRUE
headerLineNumber Line number on which the CSV header is located. Number 0
ignoreEmptyLine Indicates whether to ignore an empty line. Boolean TRUE
lineSeparator
Line separator to use when writing CSV, for
example, "rn". By default, DataWeave uses the
system line separator. String New Line
quote Character to use for quotes. String "
quoteHeader Quotes header values when set to true. String FALSE
quoteValues
Quotes every value when set to true, including
values that contain special characters. String TRUE
separator
Character that separates one field from another
field. String ,
DataWeave
Readers
Read Strategy Description Supported Formats
In-Memory This strategy parses the entire document
and loads it into memory, enabling random
access to data.
DataWeave can read all
supported formats using
this strategy.
Indexed This strategy parses the entire document
and uses disk space to avoid out-of-memory
issues on large files, enabling random
access to data. When using this strategy, a
DataWeave script can access any part of the
resulting value at any time.
When processing a String with a size larger
than 1.5 MB, DataWeave automatically splits
the value in chunks to avoid out-of-memory
issues. This feature works only with JSON
and XML input data.
CSV
JSON
XML
Streaming This strategy partitions the input document
into smaller items and accesses the data
sequentially, storing the current item in
memory. A DataWeave selector can access
only the portion of the file that is getting read.
CSV
JSON
Excel (XLSX)
XML
Streaming in
DataWeave
DataWeave supports end-to-end streaming through a flow in a Mule application.
Streaming speeds the processing of large documents without overloading
memory.
DataWeave processes streamed data as its bytes arrive instead of scanning the
entire document to index it. When in deferred mode, DataWeave can also pass
streamed output data directly to a message processor without saving it to the
disk. This behavior enables DataWeave and Mule to process data faster and
consume fewer resources than the default processes for reading and writing data.
Streaming is not enabled by default. You can use two configuration properties to
stream data in a supported data format:
• streaming property, for reading source data as a stream
• deferred writer property, for passing an output stream directly to the next
message processor in a flow
Demo 1: Represent CSV Data
Demo 2: Stream CSV Data
Demo 3: Steaming with Deferred
Mode
Flat File Definition
DataWeave uses a YAML format called FFD (for Flat File Definition) to represent
flat file schemas. The FFD format is flexible enough to support a range of use
cases, but is based around the concepts of elements, composites, segments,
groups, and structures.
Schemas must be written in Flat File Schema Language, and by convention use a
.ffd extension.
Components in
Schema
• Element - An element is a basic data item, which has an associated type and
fixed width, along with formatting options for how the data value is read and
written.
• Composite - (Optional) A group of elements. It can also include other child
composites.
• Segment - A line of data, or record, made up of any number of elements
and/or composites that might be repeated.
• Group - (Optional) Several segments grouped together. It can also include
other child groups.
• Structure - A hierarchical organization of segments, which requires that the
segments have unique identifier codes as part of their data.
Single Segment
If you are only working with one type of record, you only need to have a segment
definition for that record type in your FFD.
Demo 4: Single Segment Flat File
Multiple Segment
If you are working with multiple types of records in the same transformation, you
need to use a structure definition that controls how these different records are
combined.
Q & A Session
Thank you

More Related Content

What's hot

Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
buildacloud
 

What's hot (20)

오픈스택: 구석구석 파헤쳐보기
오픈스택: 구석구석 파헤쳐보기오픈스택: 구석구석 파헤쳐보기
오픈스택: 구석구석 파헤쳐보기
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
[Final] best practices for access management (mule soft meetups riyadh) - j...
[Final] best practices for access management (mule soft meetups   riyadh) - j...[Final] best practices for access management (mule soft meetups   riyadh) - j...
[Final] best practices for access management (mule soft meetups riyadh) - j...
 
Kubernetes: Reducing Infrastructure Cost & Complexity
Kubernetes: Reducing Infrastructure Cost & ComplexityKubernetes: Reducing Infrastructure Cost & Complexity
Kubernetes: Reducing Infrastructure Cost & Complexity
 
Integrating systems in the age of Quarkus and Camel
Integrating systems in the age of Quarkus and CamelIntegrating systems in the age of Quarkus and Camel
Integrating systems in the age of Quarkus and Camel
 
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge WorkshopI Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
 
Magento PWA Studio extensibility
Magento PWA Studio extensibilityMagento PWA Studio extensibility
Magento PWA Studio extensibility
 
Introduction to Automation Testing and Selenium overiew
Introduction to Automation Testing and Selenium overiewIntroduction to Automation Testing and Selenium overiew
Introduction to Automation Testing and Selenium overiew
 
Cloudhub 2.0
Cloudhub 2.0Cloudhub 2.0
Cloudhub 2.0
 
Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1
 
Containers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. KubernetesContainers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. Kubernetes
 
Low Code Integration with Apache Camel.pdf
Low Code Integration with Apache Camel.pdfLow Code Integration with Apache Camel.pdf
Low Code Integration with Apache Camel.pdf
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 
Prometheus for the traditional datacenter
Prometheus for the traditional datacenterPrometheus for the traditional datacenter
Prometheus for the traditional datacenter
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
 
MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleys
 
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
 
Communication in a Microservice Architecture
Communication in a Microservice ArchitectureCommunication in a Microservice Architecture
Communication in a Microservice Architecture
 

Similar to MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With MuleSoft

Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh Patel
 
SessionFive_ImportingandExportingData
SessionFive_ImportingandExportingDataSessionFive_ImportingandExportingData
SessionFive_ImportingandExportingData
Hellen Gakuruh
 

Similar to MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With MuleSoft (20)

Ranjitbanshpal1
Ranjitbanshpal1Ranjitbanshpal1
Ranjitbanshpal1
 
data stage-material
data stage-materialdata stage-material
data stage-material
 
Streaming in Mule
Streaming in MuleStreaming in Mule
Streaming in Mule
 
Bdc details
Bdc detailsBdc details
Bdc details
 
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
Saurabh_Patel_An Alternative way to Import Multiple Excel files with Multiple...
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
 
SessionFive_ImportingandExportingData
SessionFive_ImportingandExportingDataSessionFive_ImportingandExportingData
SessionFive_ImportingandExportingData
 
Composite Message Pattern
Composite Message PatternComposite Message Pattern
Composite Message Pattern
 
8023.ppt
8023.ppt8023.ppt
8023.ppt
 
Data stage
Data stageData stage
Data stage
 
SAS - Training
SAS - Training SAS - Training
SAS - Training
 
Programming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) EnvironmentProgramming Without Coding Technology (PWCT) Environment
Programming Without Coding Technology (PWCT) Environment
 
Asp.net interview questions
Asp.net interview questionsAsp.net interview questions
Asp.net interview questions
 
File connector
File connectorFile connector
File connector
 
File Connector
File ConnectorFile Connector
File Connector
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
data structures and its importance
 data structures and its importance  data structures and its importance
data structures and its importance
 
Net framework key components - By Senthil Chinnakonda
Net framework key components - By Senthil ChinnakondaNet framework key components - By Senthil Chinnakonda
Net framework key components - By Senthil Chinnakonda
 
Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldev
 

More from Jitendra Bafna

More from Jitendra Bafna (20)

MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQMuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
MuleSoft Surat Meetup#55 - Unleash the power of Anypoint MQ
 
MuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft Automation
 
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial ModernizationMuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
MuleSoft Surat Meetup#53 - MuleSoft for Clinical Trial Modernization
 
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
MuleSoft Surat Meetup#52 - Flex Gateway (Port Based Routing V/S Path Based Ro...
 
MuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
MuleSoft Surat Meetup#51 - API Monitoring - Through a New LensMuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
MuleSoft Surat Meetup#51 - API Monitoring - Through a New Lens
 
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
Engineering Student MuleSoft Meetup#7 - Leveraging MuleSoft Service in Salesf...
 
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoftMuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
 
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
MuleSoft Surat Meetup#50 - Ask the MuleSoft Ambassadors + CloudHub 2.0 Overvi...
 
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
MuleSoft Surat Meetup#49 - Robotic Process Automation - Why, Where, When and ...
 
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
 
MuleSoft Surat Meetup#47 - Error Handling With MuleSoft
MuleSoft Surat Meetup#47 - Error Handling With MuleSoftMuleSoft Surat Meetup#47 - Error Handling With MuleSoft
MuleSoft Surat Meetup#47 - Error Handling With MuleSoft
 
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoftMuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
MuleSoft Surat Meetup#46 - Deep Dive into MUnit With MuleSoft
 
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
 
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With RustMuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
MuleSoft Surat Meetup#44 - Anypoint Flex Gateway Custom Policies With Rust
 
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
Engineering Student MuleSoft Meetup#6 - Basic Understanding of DataWeave With...
 
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize LogsMuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
MuleSoft Nashik Meetup#5 - JSON Logger and Externalize Logs
 
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
MuleSoft Surat Meetup#43 - Combine Service Mesh With Anypoint API Management ...
 
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoftEngineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
Engineering Student MuleSoft Meetup#5 - Error Handling With MuleSoft
 
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
MuleSoft Surat Meetup#42 - Runtime Fabric Manager on Self Managed Kubernetes ...
 
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 

Recently uploaded (20)

ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistan
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 

MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With MuleSoft

  • 1. MuleSoft Surat Meetup Group Flat File Schemas Transformation With MuleSoft Date – 21ST Dec 2021 Time – 21:00 IST (GMT+05:30)
  • 2. 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. 2
  • 3. 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 3
  • 5. Speakers 5 Jitendra Bafna Senior Solution Architect III EPAM Systems ➢ Overall 14 years of experience in API and Integration Technologies. ➢ TOGAF 9.2 Certified. ➢ MuleSoft Ambassador and Surat/Nashik MuleSoft Meetup Leader ➢ Published overall 300+ YouTube Videos and 150+ Articles on MuleSoft and Anypoint Platform. ➢ Expertise in setting up MuleSoft platform includes Hybrid Implementation, CloudHub (Anypoint VPC, VPN and DLB), Customer Hosted Mule Runtime (Clustering and Server Group). ➢ Expertise in Application Integration using API Led Connectivity and Event Driven Architecture. ➢ Expertise in Integration with various systems like Salesforce, NetSuite ERP, Snowflake, Databases, SAP, ➢ Define Integration and migration strategy and roadmap includes migrating from on premise to CloudHub, migrating to higher version of Mule Runtime etc. ➢ Expertise in AWS, OCI.
  • 6. 6 Agenda Introduction Flat File – CSV Format Flat File – Single Segment Flat File – Multiple Segment Trivia Quiz
  • 7. CSV Format CSV stands for Comma-Separated values. MIME type: application/csv The DataWeave reader for CSV input supports the following parsing strategies: • Indexed • In-Memory • Streaming By Default, CSV reader stores input data from an entire file In-Memory if file is 1.5 MB or less. If the file is larger than 1.5 MB, the process writes the data to disk. For very large files, you can improve the performance of the reader by setting a streaming property to true.
  • 8. CSV Reader Properties Properties Description Data Type Default Value bodyStartLineNumber Line Number on which body starts. Number 0 escape Character to use for escaping special characters, such as separators or quotes. String header Indicates whether a CSV header is present. BooleanTRUE headerLineNumber Line Number on which CSV header located. Number 0 ignoreEmptyLine Indicates whether to ignore empty line. BooleanTRUE quote Character to used for quotes String " separator Character for separating one field from another filed String ,
  • 9. CSV Writer Properties Properties Description Data Type Default Value bodyStartLineNumber Line number on which the body starts. Number 0 bufferSize Size of the buffer writer. Number 8192 deferred Generates the output as a data stream when set to true, and defers the script’s execution until consumed. Boolean FALSE encoding The character set to use for the output, such as UTF-8. String null escape Character to use for escaping special characters, such as separators or quotes. String header Indicates whether a CSV header is present. Boolean TRUE headerLineNumber Line number on which the CSV header is located. Number 0 ignoreEmptyLine Indicates whether to ignore an empty line. Boolean TRUE lineSeparator Line separator to use when writing CSV, for example, "rn". By default, DataWeave uses the system line separator. String New Line quote Character to use for quotes. String " quoteHeader Quotes header values when set to true. String FALSE quoteValues Quotes every value when set to true, including values that contain special characters. String TRUE separator Character that separates one field from another field. String ,
  • 10. DataWeave Readers Read Strategy Description Supported Formats In-Memory This strategy parses the entire document and loads it into memory, enabling random access to data. DataWeave can read all supported formats using this strategy. Indexed This strategy parses the entire document and uses disk space to avoid out-of-memory issues on large files, enabling random access to data. When using this strategy, a DataWeave script can access any part of the resulting value at any time. When processing a String with a size larger than 1.5 MB, DataWeave automatically splits the value in chunks to avoid out-of-memory issues. This feature works only with JSON and XML input data. CSV JSON XML Streaming This strategy partitions the input document into smaller items and accesses the data sequentially, storing the current item in memory. A DataWeave selector can access only the portion of the file that is getting read. CSV JSON Excel (XLSX) XML
  • 11. Streaming in DataWeave DataWeave supports end-to-end streaming through a flow in a Mule application. Streaming speeds the processing of large documents without overloading memory. DataWeave processes streamed data as its bytes arrive instead of scanning the entire document to index it. When in deferred mode, DataWeave can also pass streamed output data directly to a message processor without saving it to the disk. This behavior enables DataWeave and Mule to process data faster and consume fewer resources than the default processes for reading and writing data. Streaming is not enabled by default. You can use two configuration properties to stream data in a supported data format: • streaming property, for reading source data as a stream • deferred writer property, for passing an output stream directly to the next message processor in a flow
  • 12. Demo 1: Represent CSV Data Demo 2: Stream CSV Data Demo 3: Steaming with Deferred Mode
  • 13. Flat File Definition DataWeave uses a YAML format called FFD (for Flat File Definition) to represent flat file schemas. The FFD format is flexible enough to support a range of use cases, but is based around the concepts of elements, composites, segments, groups, and structures. Schemas must be written in Flat File Schema Language, and by convention use a .ffd extension.
  • 14. Components in Schema • Element - An element is a basic data item, which has an associated type and fixed width, along with formatting options for how the data value is read and written. • Composite - (Optional) A group of elements. It can also include other child composites. • Segment - A line of data, or record, made up of any number of elements and/or composites that might be repeated. • Group - (Optional) Several segments grouped together. It can also include other child groups. • Structure - A hierarchical organization of segments, which requires that the segments have unique identifier codes as part of their data.
  • 15. Single Segment If you are only working with one type of record, you only need to have a segment definition for that record type in your FFD.
  • 16. Demo 4: Single Segment Flat File
  • 17. Multiple Segment If you are working with multiple types of records in the same transformation, you need to use a structure definition that controls how these different records are combined.
  • 18. Q & A Session