Skip to main content

BigQuery to Snowflake ETL Pipeline

The data for these agents lived in Google BigQuery across several datasets: campaign, performance, audience and test data. The agents needed it in Snowflake, in a clean shape they could rely on.

15 minincremental refresh
Dozensof tables in Snowflake
1schema per agent
HOW THE PIECES CONNECT

BigQuery to Snowflake ETL with stages and COPY INTO, a self-service loader, flattened nested columns and a 15-minute incremental pipeline.

  1. 01

    Export from BigQuery

  2. 02

    Load via COPY INTO

  3. 03

    Reshape & aggregate

  4. 04

    Refresh every 15 min

Conceptual workflow for this use case. Not a screenshot or a claim about measured results.

Data & Automation Platforms

Marketing & Advertising

The full story

We built the extract and load step. Tables were exported from BigQuery and loaded through Snowflake stages and COPY INTO. We also built a small loader tool that lets a user pick BigQuery tables and copy them straight into Snowflake.

On the Snowflake side, views and stored procedures clean and reshape the data: they build join keys the source data did not have, flatten nested and array columns, and produce pre-aggregated tables the agents read. We also built an incremental pipeline with scheduled Tasks. Every 15 minutes it picks up new agent conversation logs, removes duplicates and rolls them up per conversation.

Dozens of tables now sit in Snowflake, with a separate schema for each agent and role-based access on top.

The agents’ data was in the wrong warehouse and the wrong shape.

01

Campaign, performance, audience and test data sat across several Google BigQuery datasets.

02

The source data lacked join keys the agents needed.

03

Nested and array columns had to be flattened before agents could read them.

04

New agent conversation logs kept arriving and needed de-duplication and roll-up.

How we structured the engagement

Load it, reshape it in Snowflake, then keep it fresh on a schedule.

  1. Phase 01

    Extract and load

    Exported BigQuery tables and loaded them through Snowflake stages and COPY INTO.

  2. Phase 02

    Self-service loader

    Built a small loader tool that lets a user pick BigQuery tables and copy them straight into Snowflake.

  3. Phase 03

    Reshape

    Views and stored procedures build missing join keys, flatten nested and array columns and produce pre-aggregated tables for the agents.

  4. Phase 04

    Incremental pipeline

    Scheduled Tasks pick up new conversation logs every 15 minutes, remove duplicates and roll them up per conversation.

What we built, component by component

  1. 01

    BigQuery export

    Source tables exported from several BigQuery datasets.

  2. 02

    Snowflake stages and COPY INTO

    Bulk load into Snowflake.

  3. 03

    Loader tool

    Lets a user pick BigQuery tables and copy them into Snowflake.

  4. 04

    Views and stored procedures

    Join keys, flattening of nested and array columns, pre-aggregated tables.

  5. 05

    Scheduled Tasks

    15-minute incremental pipeline for conversation logs with de-duplication and roll-up.

  6. 06

    Per-agent schemas

    A separate schema for each agent with role-based access.

BigQuery tables are exported and loaded through Snowflake stages with COPY INTO. Views and stored procedures reshape them into agent-ready tables in each agent’s schema. Every 15 minutes, scheduled Tasks process new conversation logs into per-conversation roll-ups.

BigQuery export
Snowflake stages and COPY INTO
Loader tool
Views and stored procedures
Scheduled Tasks

The trade-offs we made and why

Decision 01Lead trade-off

Reshape inside Snowflake

Doing the joins, flattening and aggregation in Snowflake views and stored procedures keeps the logic next to the data the agents read.

Decision 02

A schema per agent

Separate schemas with role-based access keep each agent’s data and permissions clear.

What changed for the client

15 min

incremental refresh

Scheduled Tasks pick up new conversation logs every 15 minutes.

Dozens

of tables in Snowflake

Loaded from several BigQuery datasets and reshaped for the agents.

1

schema per agent

With role-based access on top.

The tools behind the system

Built with a deliberate stack chosen for production reliability and operational velocity.

6 componentsProduction-grade
Google BigQuerySnowflakeSnowflake stagesCOPY INTOSnowflake TasksPython

Similar delivery work usually starts in these service areas

If you are exploring a similar product, workflow, or implementation challenge, these are the service tracks that usually fit best.

Where this project sits in the bigger market picture

AI for campaign activation, performance analysis, testing, and marketing data.

Talk to the team that built this.

Tell us where your project stands. In a free 30-minute consultation we map what carries over from this build, what is different for you, and what a first milestone would cost.

FREE 30-MINUTE CONSULTATION

Bring the problem.
Leave with a plan.

A reply within one business day.
A written plan and a fixed quote.
100% of the code and IP is yours.
If AI is the wrong tool, we will say so.

Book your free consultation