When importing from databases, many customers create separate tables/views for Aampe that are limited to only the data necessary for Aampe to function.
Connect Snowflake to Aampe (via Google Cloud Storage)
1. Create Snowflake Integration
Integrations are named, first-class Snowflake objects that avoid the need for passing explicit cloud provider credentials such as secret keys or access tokens; instead, integration objects reference a Cloud Storage service account. Aampe will provide you with the bucket link mentioned below.2. Obtain GCP Service Account
A GCP Service account is created by Snowflake as part of Step 1:STORAGE_GCP_SERVICE_ACCOUNT property contains the GCP service account name. Example output:
3. Create File Formats
A parquet file format can be created in Snowflake as follows to unload snowflake data in the parquet format. Any other format like CSV or JSON also can be created. Here is an example script to create parquet format:4. Create External Stage
In Snowflake, an EXTERNAL STAGE object references data files stored in a location outside of Snowflake.5. Unload Data
From Snowflake, use the COPY command in Snowflake to unload data from a Snowflake table into a GCS bucket. To retain the column names in the output file, use theHEADER = TRUE copy option.
6. Automate the Unloading
What we recommend is to automate the COPY command that unloads each day’s events (single partition) into the external stage by using Snowflake TASK for it to run at a schedule: https://docs.snowflake.com/en/sql-reference/sql/create-task.html An example of same would be:Snowflake Direct Access Setup
Create a dedicated Aampe user with read-only access to your data warehouse. Once configured, we’ll handle the ETL scheduling on our side.Step 1: Switch to Account Admin
Run this in your Snowflake worksheet:Step 2: Create Role and User
Create a read-only role for Aampe (skip if you have an existing read-only role you’d prefer to use):Step 3: Grant Read Access
Grant the role access to your warehouse, database, and tables. Adjust the scope as needed:Step 4: Share Connection Details
Send us the following:- Account (from your URL, e.g.,
tzviibq-hr75240fromhttps://tzviibq-hr75240.snowflakecomputing.com) - Warehouse Name
- Database Name
- Schema Name
- Table Names (tables containing your event data)