---
title: "Snapchat Ads to Cloud SQL for MySQL: Basics You Should Know"
description: How to set up Google Cloud SQL for MySQL and ways to connect Snapchat Ads data to maximize your data insights.
image: https://blog.dataddo.com/hubfs/snapchat%20to%20sql%201-min.png
---

[![Dataddo Blog](https://blog.dataddo.com/hs-fs/hubfs/blog-logo.png?width=180&name=blog-logo.png)](https://blog.dataddo.com)

**

[Get Dataddo Free](https://www.dataddo.com/signup?hsLang=en)

[![Start for Free](https://no-cache.hubspot.com/cta/default/7885580/42e092dc-d403-4ac3-bd34-06dc490bf6d9.png)](https://cta-redirect.hubspot.com/cta/redirect/7885580/42e092dc-d403-4ac3-bd34-06dc490bf6d9)

# Snapchat Ads to Cloud SQL for MySQL: Basics You Should Know

By My Linh Phung | 13 min read

![](https://blog.dataddo.com/hubfs/snapchat%20to%20sql%201-min.png)

- **
- **
- **

According to Insider Intelligence, [Snapchat](https://www.snapchat.com/)'s userbase will reach [493.7 million by the end of 2022 and 500 million in 2024](https://www.insiderintelligence.com/insights/snapchat-user-statistics/) making it one of the most popular social media platforms today. As such, it is no surprise that many marketers try to leverage Snapchat Ads' potential to reach a wider audience. Although the platform provides a built-in analytics tool that you can use (Hootsuite has a great [article](https://blog.hootsuite.com/snapchat-analytics/) on that!), chances are you are using multiple platforms and will need [all your data in one place](https://blog.dataddo.com/why-should-a-no-code-data-integration-platform-be-considered-a-critical-component-for-data-fabric?hsLang=en).

In this quick start guide, we will show you how you can store data with Cloud SQL for MySQL (more about MySQL in our [YouTube to MySQL](https://blog.dataddo.com/youtube-to-mysql-how-to-securely-connect-your-data-in-3-simple-steps?hsLang=en) guide). But why Cloud SQL? Unless it's your personal project, in today's day and age it makes no sense to have a database stored only locally which is why there are numerous services that can host your database, such as, you guessed it, Google Cloud SQL.

So how can you load your data with this service? As usual, we will introduce different methods of data extraction and import but this time, let's first start with some Google Cloud SQL for MySQL basics.

- [[Before We Start] Set up Cloud SQL for MySQL](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#before-start) 
    - [1. Create MySQL Instance](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#mysql-instance)
    - [2. Make Sure Cloud SQL Admin API is Enabled](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#cloud-sql-api)
    - [3. Create Your Database](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#create-database)
    - [4. Whitelist Networks](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#whitelist)
- [[A] Get to Know the Platform: Manual Data Import](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-a) 
    - [Step 1 Download Your Snapchat Ads Data](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-a-step1)
    - [Step 2 Upload Your Table to Google Storage Bucket](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-a-step2)
    - [Step 3 Create Your Table (Unskippable)](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-a-step3)
    - [Too Much Room For Error](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#room-for-error)
- [[B] Custom Solution: Build Your Own Data Pipeline](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-b)
- [[C] Dataddo: Easy, Fast, and Secure Data Load](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-c) 
    - [Step 1 Create Your Data Source](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-c-step1)
    - [Step 2 Create Destination](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-c-step2)
    - [Step 3 Create Data Flow](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-c-step3)
- [Conclusion](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#conclusion)

## [Before We Start] Set up Cloud SQL for MySQL

Although the creation of the instance itself is quite intuitive (the platform's prompts will guide you through the process), there are a few things you can set up beforehand so you don't have to worry about them later. If you don't need this, you can skip to the different methods—[Manual Data Import](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-a), [Build Your Own Pipeline](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-b), or [Easy, Fast, and Secure Data Load](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-c).

### 1. Create MySQL Instance

Firstly, go to your [Google Cloud Console](https://console.cloud.google.com/sql/instances) and **Select a project** in the top panel. Next, select **MySQL** and **Enable API** if it hasn't been enabled for this particular project yet.

![1a Create instance](https://blog.dataddo.com/hs-fs/hubfs/1a%20Create%20instance.png?width=1512&name=1a%20Create%20instance.png)

Fill in your** Instance**'s ID and choose a password if you want to. We recommend using a password to be able to later connect to third-party services. If needed, you can create a secondary **User** to your database without a password for easy personal access afterwards.

![1b Create instance](https://blog.dataddo.com/hs-fs/hubfs/1b%20Create%20instance.png?width=1512&name=1b%20Create%20instance.png)

### 2. Make Sure Cloud SQL Admin API is Enabled

To work with your database, you will later need Google Cloud Shell. While you can enable it through the Cloud Shell itself, it is not very intuitive which is why it will be better to take care of it now.

Go to Google Cloud general menu and select **APIs and Services** and choose **Enabled APIs and services**.

![2a Enable Cloud SQL Admin API](https://blog.dataddo.com/hs-fs/hubfs/2a%20Enable%20Cloud%20SQL%20Admin%20API.png?width=1512&name=2a%20Enable%20Cloud%20SQL%20Admin%20API.png)

Check whether **Google SQL Admin API **is among your list of enabled services. If not, click on + **Enable APIs and Services** at the top to add it.

![2b Cloud SQL Admin API](https://blog.dataddo.com/hs-fs/hubfs/2b%20Cloud%20SQL%20Admin%20API.png?width=1512&name=2b%20Cloud%20SQL%20Admin%20API.png)

### 3. Create Your Database

Finally, create your database. There are two methods with the easier one being accessible through the Console's UI.

From the left menu go to **Databases** and simply click on **Create Database**. One thing that you should pay attention to is the **Character set** through which you choose what languages can be represented in the database.

### 4. Whitelist Networks

This step will be required for methods [[B] custom solution](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-b) and [[c] Dataddo](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#method-c) as you will be connecting your data through other means. Go to **Connections** in the left menu and choose **ADD NETWORK** in the marked area. For example, to use Dataddo, you will need to whitelist the following IPs 52.17.68.150, 52.30.37.137, 52.214.115.147 which you can see in the screenshot below.

![3 Whitelist IP adresses](https://blog.dataddo.com/hs-fs/hubfs/3%20Whitelist%20IP%20adresses.png?width=1512&name=3%20Whitelist%20IP%20adresses.png)

## [A] Get to Know the Platform: Manual Data Import

Even though we wouldn't recommend this method since it leaves too much room for error, knowing how to load manually can help you get to know the platform faster. We will go over the advantages and disadvantages of this method later in this section, let's first take a look at how to import data.

### Step 1 Download Your Snapchat Ads Data

Head over to your [Snapchat Ads account](https://ads.snapchat.com/) and in the top right corner select your **Ad account**.

1. Click on **Manage Ads** from the menu on top.
2. Select **Campaigns**, **Ad Sets**, or** Ads** depending on what you need.  
   ![Manual 1a - Download Snapchat Data](https://blog.dataddo.com/hs-fs/hubfs/Manual%200a%20-%20Download%20Snapchat%20Data.png?width=1364&name=Manual%200a%20-%20Download%20Snapchat%20Data.png)
3. (Optional) Add filters or choose columns that you would like to export.  
   ![Manual 1b - Select Columns](https://blog.dataddo.com/hs-fs/hubfs/Manual%200b%20-%20Select%20Columns.png?width=1364&name=Manual%200b%20-%20Select%20Columns.png)
4. Download your data as CSV.

### Step 2 Upload Your Table to Google Storage Bucket

To import your CSV file, you have to use [Google Storage Bucket](https://console.cloud.google.com/storage/), as of now there is no alternative. Similarly to loading [JSON files to Google BigQuery](https://blog.dataddo.com/json-to-google-bigquery-data-pipeline-in-less-than-2-minutes?hsLang=en#step2), there are a few limitations. For example, dates have to be in YYYY-MM-DD format otherwise they will appear as 0000-00-00.

![Manual 2 - Import files to Google Cloud Bucket](https://blog.dataddo.com/hs-fs/hubfs/Manual%201%20-%20Import%20files%20to%20Google%20Cloud%20Bucket%20(2).png?width=1364&name=Manual%201%20-%20Import%20files%20to%20Google%20Cloud%20Bucket%20(2).png)

### Step 3 Create Your Table (Unskippable)

If you're manually importing your files, you have to have a table created first.

1. Open** Cloud Shell** and log in with your username and, if needed, password. Here we created a new **User** without a password for faster login.
2. Create and/or select your database, and create your table.  
   CREATE DATABASE **database_name**; // skip if you used [the UI](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#create-database) to create it  
   \u **database_name** // USE **database_name** is of course also viable  
   create table **table_name** (CampaignDate date, CampaignName varchar(255), CampaignStatus varchar(255), Impressions int, SwipeUps int, Views int); // if the columns created do not correspond to those in your file, use importContext.csvImportOptions.columns[]  
   ![Manual 3 - create dataset and table](https://blog.dataddo.com/hs-fs/hubfs/Manual%202%20-%20create%20dataset%20+%20table.png?width=1512&name=Manual%202%20-%20create%20dataset%20+%20table.png)
3. Import the file from your Bucket after making sure the table name is the same as the table you created.
4. Finally, open **Cloud Shell **again to check your table (Cloud Shell could have been open during the whole importing process).  
   Type SELECT * FROM **table_name**; to see the whole table  
   **If you had a header row in your original file, don't forget to remove it as it will also get imported into the table.**  
   ![Manual 4 - Check table and delete first row](https://blog.dataddo.com/hs-fs/hubfs/Manual%204%20-%20Check%20table%20delete%20first%20row-1.png?width=1512&name=Manual%204%20-%20Check%20table%20delete%20first%20row-1.png)

### Too Much Room For Error

To be perfectly honest, all the tips regarding what to pay attention to came from personal experience. In every step described in this guide, we highlighted the errors we've made in the past using this method.

On some errors, like removing header rows, you might spend extra few minutes and they are a mild annoyance at worst. Some, however, can compromise your data integrity. Imagine missing a column in the table you created or downloading a table with an extra column without noticing. Multiply this by however many sources you're using. If not spotted immediately, your company could have been working with incomplete and inaccurate data the whole time.

As data extraction and loading is more of a mechanical activity but still with things you need to pay attention to, it is much easier to make a mistake without realizing it. Thankfully, these tasks can be automated either by yourself or through third-party services, such as Dataddo, leaving you with more time to focus on things that bring value, such as data analysis itself.

## [B] Custom Solution: Build Your Own Data Pipeline

One way to automate your data loading is by building your own data pipeline. As going more into detail would deserve an article on its own (or a whole series of lectures) and we have recommended some [articles](https://blog.dataddo.com/youtube-to-mysql-how-to-securely-connect-your-data-in-3-simple-steps?hsLang=en#custom-script) and forums in the past, here are some of the biggest [pros and cons](https://blog.dataddo.com/data-pipelines-build-vs-buy?hsLang=en).

Undeniably, the biggest advantage is that the solution will be tailor-made for your needs. As you know your organization the best, you will also know what to focus on when building your pipelines. As such, you will not be paying for functions that you don't have a use for and you will have a solution to unique challenges that existing tools cannot solve.

On the other hand, maintenance is a great disadvantage as it is very time-consuming. While the building of the pipeline will end eventually (and that on its own can be very time-consuming depending on the complexity of your organization's data architecture), it doesn't mean that pipelines won't keep breaking. Frequently changing APIs, unexpected data volumes, adding new services can all result in smaller or bigger headaches.

If the above-described challenges are hindering your data product, check out [headless data integration](https://blog.dataddo.com/introducing-dataddo-headless-a-headless-data-integration-platform?hsLang=en) options. The maintenance side will be taken care of so you can turn your attention to other aspects of your work.

## [C] Dataddo: Easy, Fast, and Secure Data Load

If the first two methods weren't for you (and we hope we properly discouraged you from manual data loading), here is how you can use a tool like [Dataddo](https://dataddo.com/) for your data integration. Connecting Snapchat Ads to Cloud SQL for MySQL will take just three steps that the platform itself will guide you through but we'd still like to give you an idea of how it's done.

### Step 1 Create Your Data Source

Go to **[Sources](https://app.dataddo.com/sources)** on the top panel and choose **Create Source**. Choose **Snapchat Ads** and authorize your account if you haven't already. Select what metrics and attributes you want to extract. Being able to choose what you want to extract can be very cost-effective as most data warehouses charge according to data transfer size.

![Dataddo 1 - create source](https://blog.dataddo.com/hs-fs/hubfs/Dataddo%201%20-%20create%20source.png?width=1512&name=Dataddo%201%20-%20create%20source.png)

Finally, click on **Test Data** to see what your data will look like.

### Step 2 Create Destination

Go back to the panel on the top, click on **[Destinations](https://app.dataddo.com/destinations)**, and choose **Google Cloud SQL (MySQL)**. Follow the prompts to set up your destination.

![Dataddo 2a - create destination](https://blog.dataddo.com/hs-fs/hubfs/Dataddo%202a%20-%20create%20destination.png?width=1512&name=Dataddo%202a%20-%20create%20destination.png)

If you haven't done so beforehand and aren't sure how to authorize your Cloud SQL for MySQL service, refer to the screenshot below. You will find all the necessary information in your Cloud Console under **Connect to this instance**. Don't forget to [whitelist the IP addresses](https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql#whitelist), fill in the information and click on **Save**.

![Dataddo 2b - authorize destination](https://blog.dataddo.com/hs-fs/hubfs/Dataddo%202b%20-%20Authorize%20destination.png?width=1512&name=Dataddo%202b%20-%20Authorize%20destination.png)

### Step 3 Create Data Flow

Both your source and destination are set up and you can now create your flow.

Click on ****[Flows](https://app.dataddo.com/flows)**** in the top panel and add your newly created source and destination. Name your table and double-check if your **Charset** (character set) is the same as your database's.

![Dataddo 3 - create Flow](https://blog.dataddo.com/hs-fs/hubfs/Dataddo%203%20-%20Create%20Flow.png?width=1512&name=Dataddo%203%20-%20Create%20Flow.png)And that's all! Now all that's left is to open your Cloud Shell and open your database with  
\u **database_name  
**and select your table with  
SELECT * FROM **table_name;  
**![Check data](https://blog.dataddo.com/hs-fs/hubfs/Dataddo%204%20-%20check%20data.png?width=1512&name=Dataddo%204%20-%20check%20data.png)

With Dataddo, there is no need to worry about your data being in the right format for MySQL to accept it, nor will you have to worry about different columns being inserted. This is a great time-saver, especially in the long run and future data loads, as you don’t have to focus on small but time-consuming details while also fully eliminating any possibility of error.

## Conclusion

Despite pointing out the many flaws of manual data loading, knowing how to do it (at least in theory) will be beneficial for both automated methods. If you know how the whole process works, you will be able to truly appreciate how much time and energy you can save.

Both building your own pipeline and using a tool such as Dataddo are methods that lower or completely nullify the risks of compromised data integrity due to human error. Nevertheless, as each has its own set of pros and cons, it's impossible to say which is better. The choice should fully depend on your organization's needs.

Hopefully, this guide was helpful to you, especially if you are just starting out with Google Cloud services, or are debating how to approach your data journey.

|   **See how Snapchat Ads data can help your business** Just a few quick steps to get your data to your Cloud SQL for MySQL for better analysis, without the hassle. [![Connect Snapchat to Cloud SQL](https://no-cache.hubspot.com/cta/default/7885580/c255090c-8ab5-4e91-b923-d0088672a1dc.png)](https://cta-redirect.hubspot.com/cta/redirect/7885580/c255090c-8ab5-4e91-b923-d0088672a1dc) |
| --- |

 

 Category: [Tools](https://blog.dataddo.com/tag/tools), [tips-tricks](https://blog.dataddo.com/tag/tips-tricks)

### Related Articles**

<https://blog.dataddo.com/never-lose-a-byte-when-and-why-to-use-full-data-re-sync?hsLang=en>

## [Never Lose a Byte: When and Why to Use Full Data Re-Sync](https://blog.dataddo.com/never-lose-a-byte-when-and-why-to-use-full-data-re-sync?hsLang=en)

*(13 min read )*

 Topics: [Tools](https://blog.dataddo.com/tag/tools), [tips-tricks](https://blog.dataddo.com/tag/tips-tricks)

<https://blog.dataddo.com/the-dataddo-community-forum-a-place-for-support-feedback-resources?hsLang=en>

## [The Dataddo Community Forum: A Place for Support, Feedback, Resources](https://blog.dataddo.com/the-dataddo-community-forum-a-place-for-support-feedback-resources?hsLang=en)

*(13 min read )*

 Topics: [Tools](https://blog.dataddo.com/tag/tools), [tips-tricks](https://blog.dataddo.com/tag/tips-tricks)

<https://blog.dataddo.com/easy-kafka-data-pipelines-to-databases-and-apps-real-time-streaming?hsLang=en>

## [Easy Kafka Data Pipelines to Databases and Apps: Real-Time Streaming](https://blog.dataddo.com/easy-kafka-data-pipelines-to-databases-and-apps-real-time-streaming?hsLang=en)

*(13 min read )*

 Topics: [Tools](https://blog.dataddo.com/tag/tools), [tips-tricks](https://blog.dataddo.com/tag/tips-tricks)

### Subscribe to The Chronicles of Marketing Newsletter

## Comments

## Subscribe to Our Blog

Stay up to date with the latest marketing, sales, and service tips and news.

![subscribe](https://blog.dataddo.com/hubfs/Illustrations/subscribe.svg)

- [****](https://www.linkedin.com/company/dataddo)

- ©  Dataddo, Inc. All Rights Reserved

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "My Linh Phung",
    "url" : "https://blog.dataddo.com/author/my-linh-phung"
  },
  "dateModified" : "2024-05-23T15:30:17.699Z",
  "datePublished" : "2022-10-11T08:45:06.000Z",
  "headline" : "Snapchat Ads to Cloud SQL for MySQL: Basics You Should Know",
  "image" : [ "https://blog.dataddo.com/hubfs/snapchat%20to%20sql%201-min.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.dataddo.com/snapchat-ads-to-cloud-sql-for-mysql",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.dataddo.com/hubfs/Dark%20logo@3x-1.png"
    },
    "name" : "Dataddo, Inc."
  }
}
```