Integrations
Extensions
Data warehouse sync

Data warehouse sync

Sync notification analytics data from Knock into your own data warehouse

You can bring your notification analytics from Knock into your own data warehouse so that you can analyze it alongside the rest of your data. To set up this sync, please contact our support team.

How it works

#

Knock integrates with your data warehouse using Prequel. There is no self-service UI to connect your account – please contact our support team to get started. We will need some information about your data warehouse, including its destination type. Depending on the type (supported databases listed here), we may ask for additional details.

Once the necessary data warehouse information is provided, Knock will provide you with a unique magic link. This link will guide you through a step-by-step wizard tailored to your specific data warehouse destination. Upon successful connection, a backfill of historical data will begin and you will continue to receive the most up-to-date data every 24 hours.

Available data

#

Messages table

#

Our data warehouse connector syncs data from our messages table. Each message represents a notification that was executed for a single recipient. You can read more about messages as a concept here.

Below is a description of the columns included in the table and the data type of each. To see how this data type will map onto the data types of your destination table, check the destination type mapping in the Prequel docs.

Please note that the table name will vary based on the name of the schema provided when filling out the form.

See possible engagement statuses for a message.

NameTypeDescription
message_idstringThe unique identifier for this message and the primary key for this table
account_idstringThe UUID of the message's account
environment_idstringThe UUID of the message's environment
environment_namestringThe name of the message's environment
environment_slugstringThe slug of the message's environment
channel_idstringThe UUID of the channel the message was sent on
channel_keystringThe unique key of the channel the message was sent on
channel_namestringThe name of the channel the message was sent on
channel_providerstringThe provider for the channel the message was sent on
channel_typestringThe type of channel the message was sent on
workflow_idstringThe UUID of the version of the workflow that the message belongs to
workflow_keystringThe unique key of the workflow the message belongs to
combined_trigger_datajson
Combined and truncated trigger data for the workflow run that generated the message, at the time the message was created. See the trigger data filtering guide for more info.
step_refstringThe reference of the step on the workflow that the message belongs to
recipient_idstringThe ID of the recipient for the message
recipient_typestring
The type of recipient for the message, can be a user or an object
tenant_idstringThe tenant associated with this message
exec_modestring
The execution mode of the workflow. Possible values are:
  • trigger - from the API
  • rehearse - test run
  • rehearse_step - test run a single step
  • integration - from an event integration source
  • scheduled - previously scheduled execution
message_statusstring
inserted_attimestampThe timestamp of when the message was created
updated_attimestampThe timestamp of when the message was last updated
archived_attimestampThe timestamp of when the message was archived
seen_attimestampThe timestamp of when the message was seen
read_attimestampThe timestamp of when the message was read
clicked_attimestampThe timestamp of when a link in the message was clicked
interacted_attimestampThe timestamp of when the message was interacted with
has_been_seeninteger (0 = false, 1 = true)Whether the message has been seen
has_been_readinteger (0 = false, 1 = true)Whether the message has been read
has_been_clickedinteger (0 = false, 1 = true)Whether a link in the message has been clicked
has_been_interactedinteger (0 = false, 1 = true)Whether the message has been interacted with
has_been_archivedinteger (0 = false, 1 = true)Whether the message has been archived
actorsjson
A JSON array of actor users or objects. Users are provided as string IDs. Objects are provided as JSON dictionaries with keys for "id" and "collection". See the RecipientIdentifier definition for more info.

Recipient change stream table

#

Our data warehouse connector syncs data from our recipients table. Each row captures the properties and preferences of a Recipient at a given moment in time.

Each row has an event_type indicating how the event was generated. Possible values are:

  • recipient.created - indicates the first time a recipient was identified
  • recipient.snapshot - is emitted every time a recipient's properties or preferences are updated, and contains the complete set of properties and preferences at that moment in time. This event may also be generated manually for all or a subset of recipients (by ID) by contacting support.
  • recipient.deleted - contains no properties or preferences, but indicates when a recipient was deleted. A recipient may be re-identified after being deleted, which will generate another recipient.created event

Events in the recipient change stream table are retained for 7 days.

Below is a description of the columns included in the table and the data type of each. To see how this data type will map onto the data types of your destination table, check the destination type mapping in the Prequel docs.

Please note that the table name will vary based on the name of the schema provided when filling out the form.

NameTypeDescription
idstringUnique event ID. Can be used to deduplicate events.
account_idstringThe UUID of the recipient's account
environment_idstringThe UUID of the recipient's environment
environment_namestringThe name of the recipient's environment
environment_slugstringThe slug of the recipient's environment
recipient_idstringThe ID of the recipient for the message
recipient_typestring
event_typestring
Possible values are:
  • recipient.created - indicates the first time a recipient was identified
  • recipient.snapshot - is emitted every time a recipient properties or preferences are updated, and contains the complete set of properties and preferences at that moment in time
  • recipient.deleted - contains no properties or preferences, but indicates when a recipient was deleted. A recipient may be re-identified after being deleted, which will generate another recipient.created event
A manual snapshot of the current state of all or a subset of recipients (by ID) can be made by contacting support.
propertiesjson
All properties currently assigned to the recipient. Will be empty for recipient.deleted.
preferencesjson
All preference sets currently assigned to the recipient, keyed by preference set ID. Will be empty for recipient.deleted.
timestamptimestampThe timestamp of when the event was emitted.