Snowflake

Best practice for setting up analytics

Data in Snowflake typically resides in tables. When you are sharing data with Toplyne, the best practice is to create separate tables for event data and profile data.

Event data table

This table will capture an action a user/account (entity) takes on your website/application/product.

Rows

Each row in this table represents an event that has been triggered by an entity.

Columns

  • ACCOUNTID/USER_ID (Required)_: Key to identify which entity has performed the event
  • EVENTNAME (Required)_: Name of the event
  • TIMESTAMP (Required)_: Timestamp at which the event has occurred
  • EVENTPROPERTIES (Optional)_: Event properties, typically shared as a JSON
    with key/value pairs

Profile data table

This table will capture any profile information a user/account (entity) has, it will help answer the question, “who is this entity?”

Rows

Each row in this table is a unique entity.

Columns

  • ACCOUNTID/USER_ID (Required)_: Key to identify which entities' properties are listed in the row.
  • Each subsequent column is a profile key, and against it, you will have its value. For example, you may choose to include the email address, geographical location, account name, current billing plan they are on, etc.

Step-by-step guide

  1. Login to your Snowflake account.

  2. On the upper right corner, click on your email account and switch the role to
    ACCOUNTADMIN. Reach out to your admin if you can't see the option.

  3. On the upper left side, click on the Shares icon.

  4. Select the Outbound tab.

  5. Click on the Create icon next to the Outbound tab button.

  6. Fill in the Secure Share Name field (this is a text field, so any name should work) and then select the database you would like to share.

  7. After this, click on Select Tables & Secure Views.

  8. Secure view to the select tables you want to share and hit Apply.

  9. Click on Create at the bottom right.

  10. Click On Next: Add Consumers on the bottom right to add the account you’d like to share the data with.

  11. Under Account Type, select Full (don’t worry - this will grant read-only access!) and enter the appropriate account based on your region. If you cannot see your region here, please reach out to your Toplyne POC or on [email protected].

RegionSnowflake Account Locator
us-east-1jfa01628
us-east-2yj35120
us-west-2xta40177
eu-west-3ux59952
  1. Click on Add on the bottom right - and we’re good to go!