Hi Rick,
We apologize that unfortunately we don’t have a serializer for CSV yet at the moment. We will be sure to pass this on to the team to see whether we can implement it in the future.
In the meanwhile, you can serialize your Alumio using the existing transformers. For example, you have the below data.
{
"data": [
{
"id": 1,
"name": "foo",
"org": "example"
},
{
"id": 2,
"name": "bar",
"org": "example"
},
{
"id": 3,
"name": "baz",
"org": "example"
}
]
}
And, you want to serialize the data in the data
property into the below CSV.
1,foo,example
2,bar,example
3,baz,example
In order to do the above transformation, you would need a Value Mapper with “List: Implode to string” mapper first to separate each field/column of every row.
The output of the above Value Mapper is below.
{
"data": [
"1,foo,example",
"2,bar,example",
"3,baz,example"
]
}
Now, you should merge the lines into a string, but a new line separator is needed between every line. You can do it using a Value Setter with a help of JMESPath function.
This way, the property data
will have the CSV-serialized value.
You can also add enclosures like "
(double-quotes) or escapes like \
(backslash) by modifying the above transformers.
Feel free to give it a try.