<file:read doc:name="Read" doc:id="18fb49b1-028b-450b-9daa-bbed3992eb79" outputMimeType='application/csv; quote="\""; streaming=true; separator=|' config-ref="File_Config" path="TheFile.txt"/>Example:
id|name|lastname|address 1|Andrew|Doe|123 Street 1 2|"John|Doe|345 Street 2 3|Julia|Doe"|567 Street 1This will get parsed as follows if expressed as JSON:
[
{
"id": "1",
"name": "Andrew",
"lastname": "Doe",
"address": "123 Street 1"
},
{
"id": "2",
"name": "John|Doe|345 Street 2\n3|Julia|Doe",
"lastname": "567 Street 1"
}
]
[
{
"id": "1",
"name": "ndrew|Doe|123 Street 1\n2|\"John|Doe|345 Street 2\n3|Julia|Doe\"|567 Street 1"
}
]
id|name|lastname|address 1|Andrew|Doe|123 Street 1 2|"John"|Doe|345 Street 2 3|Julia|"Doe"|567 Street 1This will get parsed correctly as the quoting is opening and closing in the correct value.
<file:read doc:name="Read" doc:id="18fb49b1-028b-450b-9daa-bbed3992eb79" outputMimeType='application/csv; quote=""; streaming=true; separator=|' config-ref="File_Config" path="TheFile.txt"/>
[
{
"id": "1",
"name": "Andrew",
"lastname": "Doe",
"address": "123 Street 1"
},
{
"id": "2",
"name": "\"John",
"lastname": "Doe",
"address": "345 Street 2"
},
{
"id": "3",
"name": "Julia",
"lastname": "Doe\"",
"address": "567 Street 1"
}
]
%dw 2.0
output application/json
---
read(payload,"application/csv",{separator:"|",quote:""})
001121560

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.