Overview
This guide walks you through connecting your Google Cloud Storage (GCS) bucket to Permutive so you can import data for audience building and activation. Permutive offers two connection options: connecting to your own GCS bucket, or having Permutive provision a bucket for you.Prerequisites:
- A Google Cloud Platform (GCP) account
- For customer-owned buckets: access to manage IAM permissions on your GCS bucket
- Your data organized in the required directory structure (see below)
Key Concepts
Before setting up your connection, familiarize yourself with these terms:Step 1: Set Up Your Bucket Structure
Since GCS doesn’t have built-in schema or table concepts, your bucket must follow a specific prefix (folder) structure so Permutive can correctly infer and manage your data imports.The Permutive platform maps one Connection to one Schema Prefix. To manage multiple logical schemas, you must create distinct prefixes and therefore distinct connections.
Schema Directory Structure
Structure your bucket with a single GCS prefix under which all tables reside:Table Directory Structure
The structure within a table prefix depends on whether you enable Data Partitioning during connection setup.- Partitioned (Recommended)
- Non-Partitioned
Supports Hive-style partitioning. Files are read only from the deepest partition level.Single partition:Multiple partitions:We recommend partitioning all data where possible, especially for event or user activity tables, as it improves query performance and cost-efficiency.
Data Format Recommendations
Parquet Format (Recommended)
Parquet Format (Recommended)
We highly recommend using Parquet due to its columnar storage benefits, which significantly improve query performance and reduce storage size.For Parquet files, we recommend using the ZSTD compression codec to maximize storage efficiency and speed up data processing.
CSV Format
CSV Format
We support:
.csv(uncompressed CSV).gz(gzipped CSV)
All tables under a schema should use the same data format (either all CSV or all Parquet).
Parquet Logical Types
Every column in your Parquet files should define a logical type alongside its physical type. The physical type describes how values are stored (e.g.INT64, BYTE_ARRAY); the logical type tells Permutive how to interpret them (e.g. TIMESTAMP, STRING). A column without a logical type is read as its raw physical type.
This matters most for timestamp columns. A Unix timestamp written as a plain INT64 with no logical type is read as an integer, so it cannot be used as the Time Field when creating a User Activity import. A timestamp column should look like this:
to_timestamp() in Spark or Databricks) rather than writing the raw integer.
To check the types in a file, inspect its metadata with PyArrow or pqrs:
Step 2: Create the Connection
Permutive offers two connection options for GCS:- Customer Owned Bucket
- Permutive Provisioned Bucket
Use this option to connect to an existing GCS bucket that you manage.
Configure Bucket Permissions
Before creating the connection, grant Permutive read access to your GCS bucket by assigning IAM roles to Permutive’s service account:connection@permutive.comRequired roles:roles/storage.objectViewerroles/storage.bucketViewer
1
Open IAM Settings
In the Google Cloud Console, navigate to your GCS bucket and open the Permissions tab.
2
Add Permutive Service Account
Click Grant Access and add
connection@permutive.com as a principal.3
Assign Roles
Assign the
Storage Object Viewer and Storage Legacy Bucket Reader roles (or equivalent).4
Save
Save the IAM policy changes.
If you use fine-grained permissions or folder-level access, apply these permissions to the specific prefixes you intend to connect. If access is already granted for a parent prefix or the entire bucket, no further IAM changes are needed.
Create the Connection in Permutive
1
Select GCS from the Catalog
In the Permutive dashboard, go to Connectivity > Catalog and select Google Cloud Storage. Choose Customer Owned Bucket.
2
Enter Connection Details
Fill in the following fields:
3
Save the Connection
Click Save to create the connection. It will appear on your Connections page with a “Processing” status while Permutive validates access.
Step 3: Create an Import
Once your connection is active, you can create imports to bring data into Permutive.1
Navigate to Imports
Go to Connectivity > Imports and click Create Import.
2
Configure the Import
- Select Google Cloud Storage as the source type
- Select your GCS connection
- Choose the discovered schema (matches the prefix defined in your connection)
- Choose from the list of detected tables
- Continue with the standard import configuration
Limitations
Troubleshooting
Connection fails to validate
Connection fails to validate
If your connection remains in “Processing” status or fails:
- Verify the IAM permissions have been correctly applied to
connection@permutive.com - Check that the bucket name and project ID are correct
- Ensure the schema prefix exists and contains table directories
Tables not appearing
Tables not appearing
If you don’t see expected tables after creating the connection:
- Verify your directory structure matches the required format
- Check that data files exist under each table directory
- Ensure the data format setting matches your actual file format
Partition data not being extracted
Partition data not being extracted
If partition columns aren’t appearing in your data:
- Verify “All tables are partitioned” is selected in Data Partitioning
- Check that partition directories use the correct Hive format (
column=value)
Where can I find the bucket name for a Permutive Provisioned Bucket?
Where can I find the bucket name for a Permutive Provisioned Bucket?
The bucket name is generated upon connection creation. You can find the full GCS Bucket Name on the Connection Details page immediately after setup is complete.
Next Steps
Create an Import
Learn how to import data from your GCS connection
Back to Sources
Return to Sources overview