I have a requirement where I have dynamic comma separated string value in a flow variable, which I need to convert into a csv file values.
for example, I can have following comma separated string values in variable:
abc,efg,ijk
or
mno,123,qrs,w3e
should be transferred into csv values like:
"abc","efg","ijk"
or
"mno","123","qrs","w3e"
I tried the following:
<set-variable variableName="stringValue" value="#['abc,efg,ijk']" doc:name="Variable"/>
<dw:transform-message doc:name="Transform Message">
<dw:set-payload><![CDATA[%dw 1.0
%output application/csv header=true, quoteValues=true, quoteHeader=true
---
flowVars.stringValue splitBy ","]]></dw:set-payload>
</dw:transform-message>
So, here I a expecting the csv file with value:
"abc","efg","ijk"
But its not working , getting error!