Consumer Schemas

Consumer schemas define how data is ingested from a public schema into a destination data store, see our Defining Schemas guide for more details.

Consumer Schema

name: string required

Unique name for the consumer schema.

sourceManifestSlug: string required

Slug of the manifest containing the definition of the public schema.

publicSchema: PublicSchema required

Reference to a specific version of a public schema.

definitionFile: string

Path to the source file defining this schema.

config: Config required

Configuration details specific to the consumer schema type.

Source Manifest Slug

Public Schema Reference

name: string required
majorVersion: number required

Config

The configuration of a consumer schema depends on its type, specified by the consumerSchemaType field. Currently, the following types are supported:

Postgres

Configuration for PostgreSQL-based consumer schemas.

consumerSchemaType: string [const] required
= "postgres"

Postgres consumer schema type.

destinationDataStoreSlug: string required

Slug of the data store to write to.

sql: string required

SQL to execute when an insert or update operation is performed in the referenced public schema.

deleteSql: string

SQL to execute when a delete operation is performed in the referenced public schema.