How to load data from Salesforce Pardot to Google BigQuery

Access your data on Salesforce Pardot

The first step in loading your Pardot data to any kind of data warehouse solution is to access your data and start extracting it.

Salesforce was one of the pioneers in the SaaS and API economy and as would someone expect from them, Pardot can be accessed through a web REST API.

Accessing the data from Pardot through the API is a straightforward process, you perform GET requests, to the relative API endpoints and the API will respond with a result to the query that has been made.

The API is built around 22 different resources that represent anything that someone can do with the marketing automation capabilities of the platform. You will find endpoints to access your Lists or your Visitors.

The things that you have to keep in mind when dealing with any API like the one Pardot has, are:

  1. Rate limits. Every API has some rate limits that you have to respect. Especially when you are dealing with APIs that are coming from SalesForce, where the API calls are shared among the integrations and the regular product users.
  2. Authentication. You authenticate on Pardot using OAuth, which will add some overhead to the development of an application that will try to pull data out.
  3. Paging and dealing with a big amount of data. Platforms like Pardot tend to generate a lot of data, as they track the interactions of people with your brand. Pulling big volumes of data out of an API might be difficult, especially when you consider and respect any rate limits that the API has.

Transform and prepare your Pardot data for Google BigQuery Replication

After you have accessed your data on Pardot, you will have to transform it based on two main factors,

  1. The limitations of the database that the data will be loaded onto
  2. The type of analysis that you plan to perform

Each system has specific limitations on the data types and data structures that it supports. If for example, you want to push data into Google BigQuery, then you can send nested data like JSON directly. But when you are dealing with tabular data stores, like Microsoft SQL Server, this is not an option. Instead, you will have to flatten out your data before loading it into the database.

Also, you have to choose the right data types. Again, depending on the system that you will send the data to and the data types that the API exposes to you, you will have to make the right choices. These choices are important because they can limit the expressivity of your queries and limit your analysts on what they can do directly out of the database.


Export data from Pardot to BigQuery

If you want to load Pardot data to Google BigQuery, you have to use one of the following supported data sources.

  1. Google Cloud Storage
  2. Sent data directly to BigQuery with a POST request
  3. Google Cloud Datastore Backup
  4. Streaming insert
  5. App Engine log files
  6. Cloud Storage logs

From the above list of sources, 5 and 6 are not applicable in our case.

For Google Cloud Storage, you first have to load your data into it, there are a few options on how to do this, for example, you can use the console directly as it is described here and do not forget to follow the best practices.

Another option is to post your data through the JSON API, as we see again APIs play an important role in both the extraction but also the loading of data into our data warehouse. In its simplest case, it’s just a matter of one HTTP POST request using a tool like CURL or Postman.

After you have loaded your data into Google Cloud Storage, you have to create a Load Job for BigQuery to actually load the data into it, this Job should point to the source data in Cloud Storage that have to be imported, this happens by providing source URIs that point to the appropriate objects.

The best way to load data from Pardot to BigQuery

So far we just scraped the surface of what can be done with Google BigQuery and how to ingest data into it. The way to proceed relies heavily on the data you want to load, from which service they are coming from, and the requirements of your use case.

Things can get even more complicated if you want to integrate data coming from different sources. A possible alternative, instead of writing, hosting, and maintaining a flexible data infrastructure, is to use a product like RudderStack that can handle this kind of problem automatically for you.

Easily use the Salesforce Pardot connector from RudderStack, along with multiple sources or services like databases, CRM, email campaigns, analytics, and more. Quickly and safely ingest Pardot data into Google BigQuery and start generating insights from your data.

Sign Up For Free And Start Sending Data
Test out our event stream, ELT, and reverse-ETL pipelines. Use our HTTP source to send data in less than 5 minutes, or install one of our 12 SDKs in your website or app.
Don't want to go through the pain of direct integration? RudderStack's Reverse ETL connection makes it easy to send data from your Google BigQuery Data Warehouse to Salesforce Pardot.