How to load data from Salesforce Pardot to Snowflake
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 an API like the one Pardot has, are:
- 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.
- 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.
- 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.
Pardot or Salesforce Pardot is a B2B marketing automation platform by Salesforce. It offers a very powerful editor to define and execute marketing automation flows for lead generation, nurturing and monitoring of any kind of sales funnels. Of course, as it is a product of the Salesforce family, it also integrates very well with SFDC which is one of the most feature-rich CRM, currently on the market, which makes the choice of using Pardot even more appealing.
Transform and prepare your Pardot data for Snowflake Replication
After you have accessed your data on Pardot, you will have to transform it based on two main factors,
- The limitations of the database that the data will be loaded onto
- 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 Snowflake then you can send nested data like JSON directly. But when you are dealing with tabular data stores, like PostgreSQL, this is not an option. Instead, you will have to flatten out your data before loading 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.
Data in Snowflake is organized around tables with a well-defined set of columns with each one having a specific data type.
Snowflake supports a rich set of data types. It is worth mentioning that a number of semi-structured data types is also supported. With Snowflake, is possible to load directly data in JSON, Avro, ORC, Parquet, or XML format. Hierarchical data is treated as a first-class citizen, similar to what Google BigQuery offers.
There is also one notable common data type that is not supported by Snowflake. LOB or large object data type is not supported. Instead, you should use a BINARY or VARCHAR type. But these types are not that useful for data warehouse use cases.
A typical strategy for loading data from Pardot to Snowflake is to create a schema where you will map each API endpoint to a table.
Each key inside the Pardot API endpoint response should be mapped to a column of that table and you should ensure the right conversion to a Snowflake data type.
Of course, you will need to ensure that as the data types from the Pardot API might change, you will adapt your database tables accordingly. There’s no such thing as automatic data type casting.
After you have a complete and well-defined data model or schema for Snowflake, you can move forward and start loading your data into the database.
Export data from Pardot to Snowflake
Usually, data is loaded into Snowflake in a bulk way, using the COPY INTO command. Files containing the data, usually in JSON format, are stored in a local file system or in Amazon S3 buckets. Then a COPY INTO command is invoked on the Snowflake instance and data is copied into the data warehouse.
The files can be pushed into Snowflake using the PUT command, into a staging environment before the COPY command is invoked.
Another alternative is to upload the data directly into a service like Amazon S3 from where Snowflake can access the data directly.
If you are looking into other data warehouses you may check out how to’s on Pardot to Redshift, Pardot to BigQuery, Pardot to MS SQL Server, Pardot to PostgreSQL
Updating your Pardot data on Snowflake
As you will be generating more data on Pardot, you will need to update your older data on Snowflake. This includes new records together with updates to older records that for any reason have been updated on Pardot.
You will need to periodically check Pardot for new data and repeat the process that has been described previously while updating your currently available data if needed. Updating an already existing row on a Snowflake table is achieved by creating UPDATE statements.
Another issue that you need to take care of is the identification and removal of any duplicate records on your database. Either because Pardot does not have a mechanism to identify new and updated records or because of errors on your data pipelines, duplicate records might be introduced to your database.
In general, ensuring the quality of the data that is inserted into your database is a big and difficult issue.
The best way to load data from Pardot to Snowflake
So far, we just scraped the surface of what can be done with Snowflake 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 these kinds of problems 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 Snowflake and start generating insights from your data. Don't want to go through the pain of direct integration? RudderStack’s Salesforce Pardot to Snowflake integration makes it easy to send data from Salesforce Pardot to Snowflake.
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 Salesforce Pardot integration makes it easy to send data from Salesforce Pardot to Snowflake.