删除默认分离器骡变压器 [英] Remove default seperator mule transformer
问题描述
我尝试将数据从Salesforce写入CSV文件。
我使用Data Weave变换器转换数据,但默认情况下它是\作为分隔符,并导致我的CSV中的所有问题。
我的变压器代码很简单
%dw 1.0
%输出应用程序/ csv
---
有效载荷
是否有任何选项可以禁用\作为分隔符?
CSV 转换,您可以配置一些选项:
分隔符<解析值。
default =','
报价:引号字符。
default =
Escape :转义字符引用。
default = /
标题:为true时,将解析并使用标题作为字段名称。
default = true
如何配置?
%output application / csv header = true,separator =,,escape =/
pre>
我认为你在
escape
默认值有问题。您应该更改它。
请参阅文档: https://docs.mulesoft.com/mule-user-guide/v/3.7/dataweave-reference-documentation #input-directive
I am trying to write data from Salesforce to a CSV file.
I am using Data Weave transformer to transform data, but by default it takes "\" as a separator and is causing all problems in my CSV.
My transformer code is simple one
%dw 1.0 %output application/csv --- payload
Is there any option by which we can disable '\' as a separator?
解决方案In Dataweave, for a CSV transformation, you can configure some options:
Separator: separator character for parsing the values.
default=','
Quote: quote character.
default=" "
Escape: escape char for quotes.
default=/
Header: When true, the header will be parsed and used as field names.
default=true
How to configure?
%output application/csv header=true, separator=",", escape="/"
I think you are having a problem with the
escape
default value. You should change it.Take a look to the documentation: https://docs.mulesoft.com/mule-user-guide/v/3.7/dataweave-reference-documentation#input-directive
这篇关于删除默认分离器骡变压器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!