Skip to main content

Snowflake

This page describes how to set up Snowflake as a destination.

Set up

An example setup for Snowflake is shown below.

src/pages/api/syft.ts
// ...
const destinations = [
{
type: "snowflake",
settings: {
account: "xxxx",
warehouse: "xxxx",
database: "xxxx",
schema: PUBLIC,
username: "xxxx",
password: "xxxx"
},
},
];
// ...

Configuration options

NameTypeDescriptionRequiredDefault
accountstringYour Snowflake Accounttrue
warehousestringYour Snowflake Warehousetrue
databasestringYour Snowflake Databasetrue
schemastringYour Snowflake SchematruePUBLIC
usernamestringYour Snowflake Usernametrue
passwordstringYour Snowflake Password. This is a secret field.true

Data Modeling

Track Calls

Insert

Matched events

type = "track" or type = "screen" or type = "page"

Data Mapping

Destination FieldTypeDescriptionSource Field
_idstringThe unique ID of the track call itself.$.messageId
anonymous_idstringThe anonymous ID of the user.$.anonymousId
user_idstringThe User ID.$.userId
context_ipstringThe IP address of the client. Non-user-related context fields sent with each track call.$.context.ip
context_library_namestringThe Logging library name. Non-user-related context fields sent with each track call.$.context.library.name
context_library_versionstringThe Logging library version. Non-user-related context fields sent with each track call.$.context.library.version
context_page_pathstringThe path of the page on which the event was logged.$.context.page.path
context_page_titlestringThe title of the page on which the event was logged.$.context.page.title
context_page_urlstringThe full url of the page on which the event was logged.$.context.page.url
context_localestringThe browsers locale used when the event was logged.$.context.locale
context_user_agentstringThe browsers user-agent string.$.context.userAgent
eventstringThe slug of the event name, so you can join the tracks table.$.event
namestringThe event name.$.name
received_atdatetimeWhen Syft received the track call.$.receivedAt
sent_atdatetimeWhen a user triggered the track call. This timestamp can also be affected by device clock skew$.sentAt
timestampdatetimeThe UTC-converted timestamp which is set by the Syft library$.timestamp
propertiesobjectJSON representation of the properties for the event.$.properties
contextobjectJSON representation of the context$.context
,
Identify Calls

Insert

Matched events

type = "identify" or type = "group"

Data Mapping

Destination FieldTypeDescriptionSource Field
_idstringThe unique ID of the track call itself.$.messageId
anonymous_idstringThe anonymous ID of the user.$.anonymousId
user_idstringThe User ID.$.userId
context_ipstringThe IP address of the client. Non-user-related context fields sent with each track call.$.context.ip
context_library_namestringThe Logging library name. Non-user-related context fields sent with each track call.$.context.library.name
context_library_versionstringThe Logging library version. Non-user-related context fields sent with each track call.$.context.library.version
context_page_pathstringThe path of the page on which the event was logged.$.context.page.path
context_page_titlestringThe title of the page on which the event was logged.$.context.page.title
context_page_urlstringThe full url of the page on which the event was logged.$.context.page.url
context_localestringThe browsers locale used when the event was logged.$.context.locale
context_user_agentstringThe browsers user-agent string.$.context.userAgent
eventstringThe slug of the event name, so you can join the tracks table.$.event
namestringThe event name.$.name
received_atdatetimeWhen Syft received the track call.$.receivedAt
sent_atdatetimeWhen a user triggered the track call. This timestamp can also be affected by device clock skew$.sentAt
timestampdatetimeThe UTC-converted timestamp which is set by the Syft library$.timestamp
propertiesobjectJSON representation of the properties for the event.$.properties
contextobjectJSON representation of the context$.context