在 dataweave2.0 中,如果有效负载为空,它应该只打印带有管道分隔的标题。我试过下面的代码:
%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