Connecting Google Cloud Platform to Snowflake

CONNECTING GOOGLE CLOUD PLATFORM(GCP) TO SNOWFLAKE: A STEP-BY-STEP GUIDE

Celestinfo Software Solutions Pvt. Ltd. • Sep 03, 2024

Last updated: October 2026

Quick answer: To connect GCP to Snowflake, create a Google Cloud Storage (GCS) bucket, configure a Snowflake storage integration with your GCS service account, grant the Snowflake service account a custom role with the storage.buckets.get, storage.objects.get and storage.objects.list permissions on the bucket, then create an external stage to query or load the files. For continuous loading, Snowpipe can pick up new files through a Pub/Sub notification integration.

Introduction

Connecting Google Cloud Platform (GCP) to Snowflake enables scalable data warehousing with automated ingestion from Google Cloud Storage. Once the connection is in place, Snowpipe with GCS Pub/Sub notifications can load new files into Snowflake tables in near real-time. This step-by-step GCP-to-Snowflake connection guide covers bucket setup, the storage integration, IAM permissions, an external stage and querying the staged files, with screenshots.

Pre-requisites

Step 1: Create a Google Cloud Storage Bucket

AWS Console Home

Want this running in your own account? We build Snowflake platforms end to end: ingestion, modelling, access control, and the monitoring that tells you when a load drifts. Not slide decks. Not roadmaps. Real working systems you can point at.

Book a Snowflake call Snowflake consulting

Step 2: Upload a Sample File to the Folder

GCP to Snowflake integration configuration step
GCP to Snowflake integration configuration step

Step 3: Create a Storage Integration in Snowflake

Syntax : (for creating a storage integration)

create or replace storage integration snowflake1422 --(integration name)

type = external_stage

storage_provider = gcs

enabled = true

storage_allowed_locations = ('gcs://snowflake2214/myfolder22/'); --(bucket name)

1. Retrieve the GCS service account ID

GCP to Snowflake integration configuration step

2. You can see the GCS code by running the below command.

GCP to Snowflake integration configuration step

Step 4: Grant Permissions in GCP

1. In the GCP Console, navigate to Cloud Storage > Buckets > snowflake2214.

2. Go to the Permissions tab and click Add.

3. Add the Snowflake service account from Step 3 as a principal.

4. Assign a custom role (create it first under IAM & Admin > Roles) with the storage.buckets.get, storage.objects.get and storage.objects.list permissions, which Snowflake documents for loading. Add storage.objects.delete if you will use PURGE or REMOVE, and storage.objects.create and storage.objects.delete if you will unload data. Avoid the Storage Admin role, which also lets the service account delete the bucket and change its IAM policy. The screenshot below shows Storage Admin, the role used when this guide was first written.

5. Save the changes.

GCP to Snowflake integration configuration step

Step 5: Create a Stage and File Format in Snowflake

1. Create a file format for CSV files:

GCP to Snowflake integration configuration step

2. Create an external stage pointing to the GCS folder:

GCP to Snowflake integration configuration step

3. Show the stages:

GCP to Snowflake integration configuration step

Step 6: Query the Staged Data with SELECT

1. Write the command with the identities of your table.

(ex. Teacher_id,name,section,subject…etc)

GCP to Snowflake integration configuration step

2. Run the command you’ll get your respective data which is in the google gcp.

GCP to Snowflake integration configuration step

Conclusion

Querying staged GCS files with SELECT is a quick way to check the connection and inspect the data before loading it. To load the files into a table, run COPY INTO from the same stage, and for continuous loading, set up Snowpipe with a Pub/Sub notification integration. You can also load data from Azure Blob Storage into Snowflake using a similar storage integration approach. Once data is loaded, consider using dbt for ELT data transformations to model and clean your data at scale.

Frequently Asked Questions

Q: How do I connect GCP to Snowflake?

To connect GCP to Snowflake, create a GCS storage integration in Snowflake, set up a service account in GCP with appropriate permissions, create an external stage pointing to your GCS bucket, and use the COPY INTO command to load data.

Q: What GCP services work with Snowflake?

Snowflake integrates with Google Cloud Storage (GCS) for data loading and unloading, and Google Cloud Pub/Sub notifications let Snowpipe load new files automatically.

Q: Do I need a storage integration for GCP to Snowflake?

Yes. A storage integration is recommended for GCP to Snowflake connectivity. It provides secure, managed access to your GCS buckets without embedding credentials in SQL statements, using GCP service accounts for authentication.

Chakri, Junior Developer

Chakri is a Junior Developer at CelestInfo with hands-on experience across AWS, Azure, GCP, and Snowflake cloud infrastructure.

Related Articles

Burning Questions
About CelestInfo

Simple answers to make things clear.

Our AI insights are continuously trained on large datasets and validated by experts to ensure high accuracy.

Absolutely. CelestInfo supports integration with a wide range of industry-standard software and tools.

We implement enterprise-grade encryption, access controls, and regular audits to ensure your data is safe.

Insights are updated in real-time as new data becomes available.

We offer 24/7 support via chat, email, and dedicated account managers.

Still have questions?

Get Assistance

Ready? Let's Talk!

Get expert insights and answers tailored to your business requirements and transformation.

Get Assistance