Skip to content

csv

Transforms an input into one CSV row with no header, provided the data is an object. Typically used with a batch channel.

Each key in the data becomes one field, in alphabetical key order. Values are written as follows:

  • null is an empty field
  • strings are always quoted, with any quotes doubled
  • numbers and booleans are written as is
  • arrays and objects are written as quoted JSON

If the data is not an object, an error output is recorded and the input is skipped.

Parameters

None.

Examples

User Row

Given an input from the users effect with the following data:

{
  "name": "Alice",
  "id": 1,
  "admin": true,
  "nickname": null,
  "tags": ["staff", "beta"],
  "address": {
    "city": "Paris",
    "zip": "75001"
  }
}

Produces the following CSV row, with fields for address, admin, id, name, nickname and tags:

"{""city"":""Paris"",""zip"":""75001""}",true,1,"Alice",,"[""staff"",""beta""]"