Learner
Learner

Reputation: 159

Dataweave Escape Double Quote and , while reading a json and writing to csv

am getting json and trying to bulk load to salesforce as a csv . But am getting errors when i do that .

Any idea how to escape the characters?

Input:

[
  {
    
    "Name": ".054\" X 6' ,  Guide \\ Wire2",

   
  }
]

dw:

%dw 2.0
output application/csv escape="",quote=""
---
payload

Upvotes: 0

Views: 2219

Answers (1)

Jorge Garcia
Jorge Garcia

Reputation: 1383

Following this Bulk API v2 Salesforce Documentation, I think the Dataweave writer configuration you need is the following one:

output application/csv quote="\"",quoteValues=true,escape="\""

Upvotes: 4

Related Questions