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; it will help answer the question, “what has a user/account done on your product”.

Rows

Each row in this table represents an event 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

Sample Event Table

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.

Sample User Table

Sample Account Table

Step-by-step guide to share

Prerequisites

To connect your AWS S3 bucket to Toplyne, you need:

  1. An S3 bucket containing files with supported file types and encodings.
  2. For private or encrypted buckets, an AWS account with the ability to grant Toplyne permission and to read from the bucket.

To authorize Toplyne to connect to your S3 bucket, follow these instructions:

We recommend disabling Access Control Lists (ACLs) on each S3 bucket so that the bucket contents are controlled by the bucket's access control settings and not the original file owner's settings. For more information about disabling ACLs for your bucket, see AWS S3 documentation.

Create an IAM Policy for Toplyne

  1. Open your Amazon IAM console.
  2. Go to Policies and select Create Policy.
  3. Go to the JSON tab.
  4. Please copy the following policy and paste it in the JSON tab, replacing {your-bucket-name} with the name of your S3 bucket.
  _{  
        "Version": "2012-10-17",  
        "Statement": \[  
            {  
            "Effect": "Allow",  
            "Action": [  
                    "s3:Get",  
                    "s3:List"  
            ],  
            "Resource": [  
                    "arn:aws:s3:::{your-bucket-name}/*",  
                    "arn:aws:s3:::{your-bucket-name}"  
            ]  
            }  
        ]  
    }_
  1. Proceed to the second step, Add tags (Optional). For encrypted buckets, follow Amazon's AWS S3 bucket instructions to modify the AWS KMS key's policy to grant Toplyne permissions to download files from your encrypted bucket.

  2. Proceed to the third step, Review policy.

  3. Name the policy "Toplyne-S3-Access".

  4. Click Create policy.

Create an IAM role for Toplyne

  1. Go to Roles, then select Create New Role.

  2. Select AWS Account, then enter account ID, 834469178297, in the Account ID field.

  3. Select the Require external ID checkbox.

  4. Enter the External ID you found in your connector setup form.

  5. Proceed to the second step and Add permissions.

  6. Select the "Toplyne-S3-Access" policy that you created in Step 2.

  7. Proceed to the third step, Name, review, and create.

  8. Name your new role "Toplyne", then click Create role.

  9. Select the "Toplyne" role you just created.

  10. Find the ARN and make a note of it.

Share your S3 bucket name and Role ARN with the Toplyne team.