In dataweave2.0 if payload is empty it should print only headers with pipe seperated. i have tried below code:
%dw 2.0
output application/csv separator='|', header=true
---
[{
field1: "",
field1: ""
}]
Output:
field1|field2|field3
|||
Desired output is only headers:
field1|field2|field3
Please guide