Format

A format defines how an input is transformed into the text that a channel sends to the subject system. It is configured using the format field of a channel:

channels:
  db:
    type: stream
    command: psql -q $DATABASE_URL
    format:
      type: sql

If a channel does not specify a format, the input's JSON-encoded data is sent as is.

Primitive Types

A format is represented as a discriminated union of primitive types:

  • template - builds a string using a Handlebars template
  • sql - formats the input as SQL insert