AdWords to Panoply

This page provides you with instructions on how to extract data from AdWords and load it into Panoply. (If this manual process sounds onerous, check out Stitch, which can do all the heavy lifting for you in just a few clicks.)

What is Google AdWords?

Google AdWords is a popular paid marketing tool. With AdWords, you set a budget, select keywords, and publish ads that appear on Google search results pages relevant to your keywords. AdWords collects data about campaigns that businesses can use to measure their effectiveness.

What is Panoply?

Panoply is a managed data warehouse platform that lets users set up an Amazon Redshift instance in just a few clicks. Complex tasks like schema building, data mining, modeling, scaling, performance tuning, security, and backup are handled by an array of machine learning algorithms. Panoply can import data with no schema, no modeling, and no configuration, and you can use your favorite analysis, SQL, and visualization tools just as you would if you were creating a Redshift data warehouse on your own.

Getting data out of AdWords

Google provides a SOAP API for AdWords. The first step of getting your AdWords data into your data warehouse is pulling the data off of Google's servers by using the AdWords API's Reporting features. This is a subset of the API's functionality, which also includes the ability to manage ads.

You can also link your Google Analytics and Google AdWords accounts to allow the data to cross-pollinate. This can provide richer reporting due to the breadth of knowledge that exists in Google Analytics about the people who may have viewed or clicked your ads.

You can extract granular data from AdWords API reports, allowing you to see things like impressions, clickthrough rates, and CPC broken out by time period.

Loading data into Panoply

Once you've identified all the columns you want to insert, you can use the CREATE TABLE statement in Reshift to set up a table to receive your data.

With the table built, you might think that the easiest way to migrate your data (especially if there isn't much of it) would be to build INSERT statements to add data to your Redshift table row by row. Think again! Redshift isn't optimized for inserting data one row at a time. If you have a high volume of data to be inserted, we suggest moving the data into Amazon S3 and then using the COPY command to load it into Redshift.

Keeping AdWords data up to date

So, now what? You've built a script that pulls data from AdWords and loads it into your data warehouse, but what happens tomorrow when you have thousands of new impressions?

The key is to build your script in such a way that it can also identify incremental updates to your data. If you can identify some fields that auto-increment, you could use them to give your script the ability to recognize new data. You can then set your script up as a cron job or continuous loop to keep pulling down new data as it appears.

Other data warehouse options

Panoply is great, but sometimes you need to optimize for different things when you're choosing a data warehouse. Some folks choose to go with Amazon Redshift, Google BigQuery, PostgreSQL, or Snowflake, which are RDBMSes that use similar SQL syntax. If you're interested in seeing the relevant steps for loading data into one of these platforms, check out To Redshift, To BigQuery, To Postgres, and To Snowflake.

Easier and faster alternatives

If all this sounds a bit overwhelming, don’t be alarmed. If you have all the skills necessary to go through this process, chances are building and maintaining a script like this isn’t a very high-leverage use of your time.

Thankfully, products like Stitch were built to solve this problem automatically. With just a few clicks, Stitch starts extracting your AdWords data via the API, structuring it in a way that is optimized for analysis, and inserting that data into your Panoply data warehouse.