In this article, Michel breaks down three methods for syncing data from Snowflake to Google Ads, including:
- Manual CSV upload to Google Ads
- An semi-automated sync using the Snowflake and Google Ads APIs
- A fully automated sync using Fivetran Activations reverse ETL
Google Ads is one of the biggest platforms in the world you can advertise on and we're going to show you how to use it more effectively. Any digital marketer worth their money knows you have to target the right message to the right audience, and that they need fresh, accurate data from their data team to do it.
Importing data into Google Ads allows your org to leverage your customer lists for lookalike audiences, exclusion lists, and direct targeting lists. If you, for example, have a list of people who have expressed interest in a particular product, you can upload that list and target those people with a tailored ad.
We'll show you how to export your data from Snowflake and import it into Google Ads using three different methods: one manual, one semi-automated, and one fully automated.
Let’s get going.
Snowflake to Google Ads method 1: Manually import data into Google Ads
Google Ads has a very specific format you need to adhere to when uploading your data, so we'll start there. Here’s a breakdown of the steps:
- Go to Google Ads and log into your account.
- Click on the Tools and settings button in the navigation bar.
- From the dropdown, choose Audience manager.
- On the left-hand side click on Segments.
- Click the + button labelled create remarketing list.
- From the dropdown, choose Customer list.
In the Data to upload section, you can choose (you guessed it) which type of data you'll upload. We'll go with the first option, which is Upload Emails, Phones and/or Postal Addresses. You can then download a template, which will show you exactly what your upload file needs to look like. And I do mean exactly. For example, if you choose to upload email addresses, you will need a CSV file with exactly one column called Email and nothing else.
Now that we know exactly which data we need, we can export it from Snowflake. Head over to the Snowflake web UI and write a query that will satisfy the template requirements. In our case, it's as simple as the query below.
Click the download button once your query finishes running. Then head back to Google Ads and from there upload your file. If everything went well, you'll get a confirmation screen. Note: It can now take up to 24 hours for Google to match your data to users, so take some time to get a snack, a new cup of coffee, and read through the rest of the tips at the end of this article. ☕
Snowflake to Google Ads method 2: Automatically import data into Google Ads
The automated method leverages the Snowflake and Google Ads APIs. We'll show you how to set up the export/import using Python, though you can use your language of choice here (e.g. Java). You only need your “regular” Snowflake credentials, which you use to log into the web UI, to use the Snowflake API.
For Google Ads, you'll have to jump through a number of hoops before you're up and running with their API. While I won’t cover that here, Google has dedicated entire pages of their docs to get you to that point if you need some extra support. And, as with all things tech, there is always a YouTuber with a video to make your life easier if Google’s docs feel a little unclear.
Once you're all set with API access, we'll start by exporting the data from Snowflake. If you're following along with Python and haven't installed the libraries yet, do so now with the following.
Next, import the Snowflake connector.
To export data from Snowflake, you'll need the same username, password, and account you use to log into the web UI. If you normally log into the classic Snowflake web UI, you'll find your account name in the URL: https://<your-account>.snowflakecomputing.com. Using these, create a Connection object with the following code:
You're now ready to query your data. Our query is straightforward since we only need to retrieve email addresses.
The cursor contains our data as a list of tuples, which we can retrieve using fetchall. It also contains the column names, which, for our particular use case, we don't need. However, I’ll show you how to access them in case you need it for a different use case down the road.
If you got the data you wanted, you can close your connection to Snowflake.
Unfortunately, importing our data into Google Ads using the Python client library is as challenging as getting access to the API. In the end, we used this example with a few modifications. Start by importing the necessary libraries.
You'll need a client. There are multiple ways to instantiate one, but you can follow along with this method:
If you haven't created a segment list yet, now’s the time. We made some slight changes to this function to make it more useful (see comments in the code block below).
If all went well, the variable user_list_resource_name will look something like customers/123456789/userLists/987654321, where 123456789 is your Google Ads customer ID and 987654321 is the ID of your segment. If you already have a segment list and need to find the ID, the quickest way to do so is through the web UI. You’ll find your Google Ads customer ID in the navigation bar, next to the name of the account. To get its ID, navigate into the segment you want to add users to, it’ll be in the URL as the query parameter userListId. Use these values to manually create the user_list_resource_name string variable.
Now onto the actual adding of users. Again, we've made some slight modifications to the example code. Specifically, we've added emails as a parameter to _add_users_to_customer_match_user_list and looped over them to add the operations to request.operations. We’ve also added email as a parameter to _build_offline_user_data_job_operations.
Note: Google Ads requires you hash your customers’ email addresses using SHA-256 prior to uploading. This function takes care of that, along with cleaning the email addresses. Even a single deviation in characters will result in an entirely different hash and will derail Google Ads’s ability to match the email address to one of its users. If you have reason to believe your data requires more cleaning than what’s implemented in this function, now would be the time to do something about that.
Warning: wall of code incoming. It’s great if you’re able to understand the below two functions so you can modify them to fit your needs, but no worries if you don’t. In short, it creates the actual operations, which will add the hashed email addresses to your segment.
After all that, the code below presses the proverbial red button, which uploads your customers email addresses. 🙌
The output should indicate the operation is running, which will take a while. Now you can sit back and wait for your data to become available, which can take anywhere between six and 48 hours. ⏰
Snowflake to Google Ads method 3: Set and forget your Snowflake to Google Ads syncs with Fivetran Activations
Since I know you're still waiting for your data to hit Google Ads from Snowflake, I’ll take this opportunity to tell you about an easier (and faster) way to move your customer data from A to B.
While the manual method is straightforward, if you have to make modifications to your lists often enough, you’ll quickly realize it’s more efficient to automate the process. However, as you saw above, setting up syncs via respective APIs isn’t exactly quick or easy (and you’d still have to schedule or otherwise trigger your export/import process another way). Plus, you’d still need to figure out how to do error handling if/when something goes awry.
In short: Even that automated method is a bear. 🐻
Thankfully, there’s an automated method that doesn’t just create more work for you down the line: Reverse ETL with Fivetran Activations.
Once you’ve signed up for Fivetran Activations and have your account set up (you can grab a free trial here), you just have to hook up Snowflake as your data source and make sure your Google Ads account is ready to go.
From there, it’s just six quick steps to set up an automatic sync between Snowflake and Google Ads that will surface any issues to email or Slack if they occur:
- Navigate to Connections
- Click on Add Service button
- Select Google Ads from the list
- Authenticate Google Ads access with your account
- Select the Google Ads account want to send data to
- Take a break and go for a walk with all that extra time you just reclaimed. ☀️
If you want a full video walkthrough of the steps, check out the demo below.
Want to learn more about managing offline conversions in Google Ads via your data warehouse? Check out this webinar. 👇
Then, head on over to the trial sign up page and start syncing your data faster and easier than ever before.


