Google Ads to Snowflake: 2 Easy Methods

• September 7th, 2021

Google Ads is perhaps one of the best ways nowadays to let people know about your business, products, and/or services. Naturally, where business intelligence is concerned, decision-makers want to be able to analyze the various metrics of their online marketing campaigns, especially as it relates to their other marketing efforts and the performance of their business as a whole. While Google does allow for some analysis of Google Ads data, a more robust solution is required, such as consolidating all of your data in a data warehouse solution like Snowflake.

Do you need to make this shift in data consolidation? If that’s the case, this article will present you with two methods of carrying out data migration from Google Ads to Snowflake and allow you to determine the best option for your needs.

Table of Contents

Introduction to Google Ads

Google Ads Logo
Image Source

Google Ads is one of the most pervasive Advertising Platforms being used today. Developed by Google, and a subsidiary of Alphabet Inc., Google Ads allows businesses, large, small, and enterprise-level, to pay to have advertisements, product listings, or service offerings displayed to web users via the Google Ad Network.

The Google Ad Network allows businesses to display their text ads to users who conduct searches on Google using its Google Search network, while those businesses that would prefer to display more visual advertising can have their ads displayed on non-search websites, mobile apps, and videos via its Google Display Network. Google Ads’ pricing structure also allows businesses to bid on the Cost-per-Click (CPC) and/or Cost-per-Impression (CPM) rate, making it one of the most cost-effective marketing solutions for businesses of any size.

Introduction to Snowflake

Snowflake Logo
Image Source

Snowflake is a Cloud-Based Data Warehouse and Analytics Solution that provides excellent flexibility, scalability, and performance for a wide spectrum of businesses. It is built on other popular data-lake architectures (historically, it has been run on Amazon S3 and Microsoft Azure, and it currently runs on the Google Cloud Platform).

Snowflake is not simply another data lake solution. In fact, referring to itself as a “Data Warehouse-as-a-Service” (DWaaS?), Snowflake is differentiated by its architecture and the flexibility its architecture provides. Built-in three independently scalable layers (Database Storage, Virtual Warehouses, and Cloud Services) Snowflake provides enterprise-level performance and services at nearly every price point.

Importance of Data Transfer from Google Ads to Snowflake

There are a few reasons why an organisation would wish to move its data from Google Ads to Snowflake.

  1. The ability to combine Google Ads data with data from other marketing campaigns and sales records, resulting in truly useful business intelligence.
  2. To be able to leverage Snowflake’s scalability features. 
  3. To have a wider swath of BI tools available at your fingertips via Snowflake’s many integrations.

Methods of Moving Data from Google Ads to Snowflake

  • Method 1: Manually Move Data using Google Scripts
    This method entails utilizing the assortment of pre-built scripts designed by the engineers at Google to fetch campaign records, save them to a local machine, and then load them to Snowflake. This approach will require a base familiarity with scripting and discipline in time management to regularly carry out the process in order to maintain up-to-date records.
  • Method 2: Move Data Instantly using Hevo
    Hevo Data is our fully managed, fully automated data pipeline platform that can conduct data extraction, transformation, and loading from 100+ Data Sources(Including Free Sources like Google Ads) on a near-real-time basis after initial setup, and the initial setup requires little technical know-how beyond the details of your data sources and targets.
Sign up here for a 14-day Free Trial!

Methods of Moving Data from Google Ads to Snowflake

There are multiple methods that can be used to connect Google Ads to Snowflake and load data easily:

Method 1: Manually Move Data Using Google Scripts

Prerequisites

  1. A copy of the template spreadsheet.
  2. A CLI (Command Line Interface) program to execute the commands. This could be SnowSQL, any JDBC or ODBC client or any 3rd party software that can connect to Snowflake.

Migrating data from Google Ads to Snowflake will have to be done in two phases

  • Extracting data from Google Ads
  • Loading data to Snowflake

A) Extracting Data from Google Ads

Google Ads data may be obtained by building scripts in a combination of Javascript and Adwords Query Language, aka AWQL. You’ll be able to extract a variety of data points including click-thru rates, impressions, and costs-per-click. Fortunately, Google has provided an entire library of Google Ads Scripts Solutions that may be used to automate interactions with their systems.

In this article, we shall be using the Account Summary script as an example. The Account Summary script will return a report, in spreadsheet format, showing the performance of an entire Google Ads account.

  1. Log into your Google Ads account.
  2. Click the Tools icon.
  3. Select Scripts under BULK ACTIONS.
  4. Click the + icon to add a script. This will also open the script IDE.
  5. Copy the source code found here and paste it into the script IDE:
  6. Update the SPREADSHEET_URL variable in the script to match the URL of your copy of the template spreadsheet (Prerequisites).
  7. Extend the script to generate a more robust report.
    • The report may be extended by adding additional metrics to the script, specifically, to the REPORT_FIELDS variable.
    • For each additional metric, a corresponding field must also be added to the template spreadsheet.
    • These additional metrics are available in Google Ads’ Account Performance Report.
    • For additional guidance on extending the report, click here. 
  8. Schedule the script to run Daily at a time that is convenient for you.
    Once the script runs it will populate the copy of the template spreadsheet that you had created and specified in the script. 
  9. Download the spreadsheet as a CSV file labeled “data.csv”.

B) Loading Data to Snowflake

In this example, we are going to load our data into Snowflake in two stages:

  • Uploading data to a Snowflake stage
  • Load the content into a Snowflake database table.

Uploading Data to a Snowflake stage

  1. Create the Snowflake stage. Enter the following command into your CLI client:
create or replace stage my_stage

We shall assume that this creates a stage called “staged”.

2. Assuming that you’ve saved your data.csv file to a folder named “campaigns” on your local hard drive, input (depending on the OS):

Windows:

put file://c:campaignsdata.csv @~/staged

Linux/MacOS:

put file:///campaigns/data.csv @~/staged

To confirm that the upload was successful:

List @~;

For more information on this entire process, see here.

Loading Content Into a Snowflake Database Table

Assuming that your table instance is called “mytable”:

copy into mytable from @~/staged;

For more information on this process, see here.

Congrats! Your data has now been successfully migrated and you may begin running queries on it.

Method 2: Migrating Data from Google Ads to Snowflake using Hevo

Hevo Data Product Image

Hevo, a No-code Data Pipeline requires no technical skills, no coding, on the part of the user. Hevo allows its users to quickly set up data pipelines from various sources such as Google Ads, etc., to a destination almost effortlessly and for free. In this article, we’ll show you how easily a data pipeline between Google Ads and Snowflake may be built out. 

Get Started with Hevo for free

Google Ads data can be moved to Snowflake in two easy steps: 

Step 1: Authenticate and connect your Google Ads source.

Configure Google Ads to Snowflake
Image Source

Step 2: Configure your Snowflake data warehouse and start your data migration from Google Ads to Snowflake.

Configure Snowflake Destination
Image Source

Once completed, Hevo will immediately get to building out your data pipeline to migrate your data from your Google Ads campaigns to your Snowflake table. Hevo guarantees data integrity and will notify you should any issues arise.

Benefits of Using Hevo

Using Hevo enables better personal time and resource management. We want you to spend your time and energy on those things that are the best use of your time and effort and really move your business forward. However, Hevo also offers more benefits:

  • Easy Implementation: An intuitive interface and easy setup.
  • Scalability: Whether your data needs are in the gigabyte or petabyte-scale, we’ve got you covered. Including support for over 100 system integrations, all simultaneously accessible.
  • Fully Managed Operation: APIs and interfaces change and are updated constantly, but we maintain the integrity of the pipeline so that you don’t have to.
  • Data Transformation: Are different formats required between systems? We’ll ensure that your data is transformed to spec with zero loss in conversion or migration.
  • Zero Data Loss: Hevo’s fault-tolerant infrastructure guarantees the reliable transfer of data without any losses.
Sign up here for a 14-day Free Trial!

Conclusion

As a ubiquitous marketing platform, almost every business uses Google Ads, and Snowflake’s ingenious architecture makes it a viable option for business intelligence generation. Combining the power of both of these systems will provide valuable insights and lead to effective action, creating success for your business. Hevo Data makes this possible, easy and hassle-free.

Visit our Website to Explore Hevo

Hevo Data, a No-Code Data Pipeline seamlessly transfer data from a collection of sources like Google Ads into a Data Warehouse such as Snowflake or a destination of your choice for free. It is a reliable, secure, and completely automated service that doesn’t require you to write any code!

If you are using Google Ads as an advertising platform for your enterprise and looking for a No-fuss alternative to Manual Data Integration, then Hevo can efficiently automate this for you. Hevo, with its strong integration with 100+ sources & BI tools(Including 30+ Free Sources like Google Ads), allows you to not only export & load data but also transform & enrich your data & make it analysis-ready in a jiffy.

Want to take Hevo for a spin? Sign Up for a 14-day free trial and experience the feature-rich Hevo suite first hand.Have a look at our unbeatable pricing, which will help you choose the right plan for you.

What is your preferred approach to transfer data from Google Ads to Snowflake? Let us know in the comments below.

No-code Data Pipeline for Snowflake