How to load data from Salesforce to BigQuery

Learn how to use Airbyte to synchronize your Salesforce data into BigQuery within minutes.

Trusted by data-driven companies

Building your pipeline or Using Airbyte

Airbyte is the only open solution empowering data teams  to meet all their growing custom business demands in the new AI era.

Building in-house pipelines
Bespoke pipelines are:
  • Inconsistent and inaccurate data
  • Laborious and expensive
  • Brittle and inflexible
Furthermore, you will need to build and maintain Y x Z pipelines with Y sources and Z destinations to cover all your needs.
After Airbyte
Airbyte connections are:
  • Reliable and accurate
  • Extensible and scalable for all your needs
  • Deployed and governed your way
All your pipelines in minutes, however custom they are, thanks to Airbyte’s connector marketplace and Connector Builder.

Start syncing with Airbyte in 3 easy steps within 10 minutes

Set up a Salesforce connector in Airbyte

Connect to Salesforce or one of 400+ pre-built or 10,000+ custom connectors through simple account authentication.

Set up BigQuery for your extracted Salesforce data

Select BigQuery where you want to import data from your Salesforce source to. You can also choose other cloud data warehouses, databases, data lakes, vector databases, or any other supported Airbyte destinations.

Configure the Salesforce to BigQuery in Airbyte

This includes selecting the data you want to extract - streams and columns -, the sync frequency, where in the destination you want that data to be loaded.

Take a virtual tour

Check out our interactive demo and our how-to videos to learn how you can sync data from any source to any destination.

Demo video of Airbyte Cloud

Demo video of AI Connector Builder

Old Automated Content

TL;DR

This can be done by building a data pipeline manually, usually a Python script (you can leverage a tool as Apache Airflow for this). This process can take more than a full week of development. Or it can be done in minutes on Airbyte in three easy steps:

  1. set up Salesforce as a source connector (using Auth, or usually an API key)
  2. set up BigQuery as a destination connector
  3. define which data you want to transfer and how frequently

You can choose to self-host the pipeline using Airbyte Open Source or have it managed for you with Airbyte Cloud.

This tutorial’s purpose is to show you how.

What is Salesforce

Salesforce is a cloud-based customer relationship management (CRM) platform providing business solutions software on a subscription basis. Salesforce is a huge force in the ecommerce world, helping businesses with marketing, commerce, service and sales, and enabling enterprises’ IT teams to collaborate easily from anywhere. Salesforces is the force behind many industries, offering healthcare, automotive, finance, media, communications, and manufacturing multichannel support. Its services are wide-ranging, with access to customer, partner, and developer communities as well as an app exchange marketplace.

What is BigQuery

BigQuery is an enterprise data warehouse that draws on the processing power of Google Cloud Storage to enable fast processing of SQL queries through massive datasets. BigQuery helps businesses select the most appropriate software provider to assemble their data, based on the platforms the business uses. Once a business’ data is acculumated, it is moved into BigQuery. The company controls access to the data, but BigQuery stores and processes it for greater speed and convenience.

Integrate Salesforce with BigQuery in minutes

Try for free now

Prerequisites

  1. A Salesforce account to transfer your customer data automatically from.
  2. A BigQuery account.
  3. An active Airbyte Cloud account, or you can also choose to use Airbyte Open Source locally. You can follow the instructions to set up Airbyte on your system using docker-compose.

Airbyte is an open-source data integration platform that consolidates and streamlines the process of extracting and loading data from multiple data sources to data warehouses. It offers pre-built connectors, including Salesforce and BigQuery, for seamless data migration.

When using Airbyte to move data from Salesforce to BigQuery, it extracts data from Salesforce using the source connector, converts it into a format BigQuery can ingest using the provided schema, and then loads it into BigQuery via the destination connector. This allows businesses to leverage their Salesforce data for advanced analytics and insights within BigQuery, simplifying the ETL process and saving significant time and resources.

Step 1: Set up Salesforce as a source connector

1. Open the Airbyte platform and navigate to the "Sources" tab on the left-hand side of the screen.

2. Click on the "Salesforce" source connector and select "Create new connection."

3. Enter a name for your connection and click "Next."

4. Enter your Salesforce credentials, including your username, password, and security token.

5. Click "Test connection" to ensure that your credentials are correct and that Airbyte can connect to your Salesforce account.

6. Once the connection is successful, select the objects you want to replicate from Salesforce.

7. Choose the replication frequency and any other settings you want to apply to your connection.

8. Click "Create connection" to save your settings and start replicating data from Salesforce to Airbyte.

9. You can monitor the progress of your replication in the "Connections" tab and view the data in the "Dashboard" tab.

Step 2: Set up BigQuery as a destination connector

1. First, navigate to the Airbyte dashboard and select the "Destinations" tab on the left-hand side of the screen.

2. Scroll down until you find the "BigQuery" destination connector and click on it.

3. Click the "Create Destination" button to begin setting up your BigQuery destination.

4. Enter your Google Cloud Platform project ID and service account credentials in the appropriate fields.

5. Next, select the dataset you want to use for your destination and enter the table prefix you want to use.

6. Choose the schema mapping for your data, which will determine how your data is organized in BigQuery.

7. Finally, review your settings and click the "Create Destination" button to complete the setup process.

8. Once your destination is created, you can begin configuring your source connectors to start syncing data to BigQuery.

9. To do this, navigate to the "Sources" tab on the left-hand side of the screen and select the source connector you want to use.

10. Follow the prompts to enter your source credentials and configure your sync settings.

11. When you reach the "Destination" step, select your BigQuery destination from the dropdown menu and choose the dataset and table prefix you want to use.

12. Review your settings and click the "Create Connection" button to start syncing data from your source to your BigQuery destination.

Step 3: Set up a connection to sync your Salesforce data to BigQuery

Once you've successfully connected Salesforce as a data source and BigQuery as a destination in Airbyte, you can set up a data pipeline between them with the following steps:

  1. Create a new connection: On the Airbyte dashboard, navigate to the 'Connections' tab and click the '+ New Connection' button.
  2. Choose your source: Select Salesforce from the dropdown list of your configured sources.
  3. Select your destination: Choose BigQuery from the dropdown list of your configured destinations.
  4. Configure your sync: Define the frequency of your data syncs based on your business needs. Airbyte allows both manual and automatic scheduling for your data refreshes.
  5. Select the data to sync: Choose the specific Salesforce objects you want to import data from towards BigQuery. You can sync all data or select specific tables and fields.
  6. Select the sync mode for your streams: Choose between full refreshes or incremental syncs (with deduplication if you want), and this for all streams or at the stream level. Incremental is only available for streams that have a primary cursor.
  7. Test your connection: Click the 'Test Connection' button to make sure that your setup works. If the connection test is successful, save your configuration.
  8. Start the sync: If the test passes, click 'Set Up Connection'. Airbyte will start moving data from Salesforce to BigQuery according to your settings.

Remember, Airbyte keeps your data in sync at the frequency you determine, ensuring your BigQuery data warehouse is always up-to-date with your Salesforce data.

Use Cases to transfer your Salesforce data to BigQuery

Integrating data from Salesforce to BigQuery provides several benefits. Here are a few use cases:

  1. Advanced Analytics: BigQuery’s powerful data processing capabilities enable you to perform complex queries and data analysis on your Salesforce data, extracting insights that wouldn't be possible within Salesforce alone.
  2. Data Consolidation: If you're using multiple other sources along with Salesforce, syncing to BigQuery allows you to centralize your data for a holistic view of your operations, and to set up a change data capture process so you never have any discrepancies in your data again.
  3. Historical Data Analysis: Salesforce has limits on historical data. Syncing data to BigQuery allows for long-term data retention and analysis of historical trends over time.
  4. Data Security and Compliance: BigQuery provides robust data security features. Syncing Salesforce data to BigQuery ensures your data is secured and allows for advanced data governance and compliance management.
  5. Scalability: BigQuery can handle large volumes of data without affecting performance, providing an ideal solution for growing businesses with expanding Salesforce data.
  6. Data Science and Machine Learning: By having Salesforce data in BigQuery, you can apply machine learning models to your data for predictive analytics, customer segmentation, and more.
  7. Reporting and Visualization: While Salesforce provides reporting tools, data visualization tools like Tableau, PowerBI, Looker (Google Data Studio) can connect to BigQuery, providing more advanced business intelligence options. If you have a Salesforce table that needs to be converted to a BigQuery table, Airbyte can do that automatically.

Wrapping Up

To summarize, this tutorial has shown you how to:

  1. Configure a Salesforce account as an Airbyte data source connector.
  2. Configure BigQuery as a data destination connector.
  3. Create an Airbyte data pipeline that will automatically be moving data directly from Salesforce to BigQuery after you set a schedule

With Airbyte, creating data pipelines take minutes, and the data integration possibilities are endless. Airbyte supports the largest catalog of API tools, databases, and files, among other sources. Airbyte's connectors are open-source, so you can add any custom objects to the connector, or even build a new connector from scratch without any local dev environment or any data engineer within 10 minutes with the no-code connector builder.

We look forward to seeing you make use of it! We invite you to join the conversation on our community Slack Channel, or sign up for our newsletter. You should also check out other Airbyte tutorials, and Airbyte’s content hub!

What should you do next?

Hope you enjoyed the reading. Here are the 3 ways we can help you in your data journey:

flag icon
Easily address your data movement needs with Airbyte Cloud
Take the first step towards extensible data movement infrastructure that will give a ton of time back to your data team. 
Get started with Airbyte for free
high five icon
Talk to a data infrastructure expert
Get a free consultation with an Airbyte expert to significantly improve your data movement infrastructure. 
Talk to sales
stars sparkling
Improve your data infrastructure knowledge
Subscribe to our monthly newsletter and get the community’s new enlightening content along with Airbyte’s progress in their mission to solve data integration once and for all.
Subscribe to newsletter

What sets Airbyte Apart

Modern GenAI Workflows

Streamline AI workflows with Airbyte: load unstructured data into vector stores like Pinecone, Weaviate, and Milvus. Supports RAG transformations with LangChain chunking and embeddings from OpenAI, Cohere, etc., all in one operation.

Move Large Volumes, Fast

Quickly get up and running with a 5-minute setup that supports both incremental and full refreshes, for databases of any size.

An Extensible Open-Source Standard

More than 1,000 developers contribute to Airbyte’s connectors, different interfaces (UI, API, Terraform Provider, Python Library), and integrations with the rest of the stack. Airbyte’s Connector Builder lets you edit or add new connectors in minutes.

Full Control & Security

Airbyte secures your data with cloud-hosted, self-hosted or hybrid deployment options. Single Sign-On (SSO) and Role-Based Access Control (RBAC) ensure only authorized users have access with the right permissions. Airbyte acts as a HIPAA conduit and supports compliance with CCPA, GDPR, and SOC2.

Fully Featured & Integrated

Airbyte automates schema evolution for seamless data flow, and utilizes efficient Change Data Capture (CDC) for real-time updates. Select only the columns you need, and leverage our dbt integration for powerful data transformations.

Enterprise Support with SLAs

Airbyte Self-Managed Enterprise comes with dedicated support and guaranteed service level agreements (SLAs), ensuring that your data movement infrastructure remains reliable and performant, and expert assistance is available when needed.

What our users say

Jean-Mathieu Saponaro
Data & Analytics Senior Eng Manager

"The intake layer of Datadog’s self-serve analytics platform is largely built on Airbyte.Airbyte’s ease of use and extensibility allowed any team in the company to push their data into the platform - without assistance from the data team!"

Learn more
Chase Zieman headshot
Chase Zieman
Chief Data Officer

“Airbyte helped us accelerate our progress by years, compared to our competitors. We don’t need to worry about connectors and focus on creating value for our users instead of building infrastructure. That’s priceless. The time and energy saved allows us to disrupt and grow faster.”

Learn more
Alexis Weill
Data Lead

“We chose Airbyte for its ease of use, its pricing scalability and its absence of vendor lock-in. Having a lean team makes them our top criteria.
The value of being able to scale and execute at a high level by maximizing resources is immense”

Learn more

Sync with Airbyte

How to Sync Salesforce to BigQuery Manually

FAQs

ETL, an acronym for Extract, Transform, Load, is a vital data integration process. It involves extracting data from diverse sources, transforming it into a usable format, and loading it into a database, data warehouse or data lake. This process enables meaningful data analysis, enhancing business intelligence.

Salesforce is a cloud-based customer relationship management (CRM) platform providing business solutions software on a subscription basis. Salesforce is a huge force in the ecommerce world, helping businesses with marketing, commerce, service and sales, and enabling enterprises’ IT teams to collaborate easily from anywhere. Salesforces is the force behind many industries, offering healthcare, automotive, finance, media, communications, and manufacturing multichannel support. Its services are wide-ranging, with access to customer, partner, and developer communities as well as an app exchange marketplace.

Salesforce's API provides access to a wide range of data types, including:  

1. Accounts: Information about customer accounts, including contact details, billing information, and purchase history.  

2. Leads: Data on potential customers, including contact information, lead source, and lead status.  

3. Opportunities: Information on potential sales deals, including deal size, stage, and probability of closing.  

4. Contacts: Details on individual contacts associated with customer accounts, including contact information and activity history.  

5. Cases: Information on customer service cases, including case details, status, and resolution.  

6. Products: Data on products and services offered by the company, including pricing, availability, and product descriptions.  

7. Campaigns: Information on marketing campaigns, including campaign details, status, and results.  

8. Reports and Dashboards: Access to pre-built and custom reports and dashboards that provide insights into sales, marketing, and customer service performance.  

9. Custom Objects: Ability to access and manipulate custom objects created by the organization to store specific types of data.  

Overall, Salesforce's API provides access to a comprehensive set of data types that enable organizations to manage and analyze their customer relationships, sales processes, and marketing campaigns.

This can be done by building a data pipeline manually, usually a Python script (you can leverage a tool as Apache Airflow for this). This process can take more than a full week of development. Or it can be done in minutes on Airbyte in three easy steps: 
1. Set up Salesforce to BigQuery as a source connector (using Auth, or usually an API key)
2. Choose a destination (more than 50 available destination databases, data warehouses or lakes) to sync data too and set it up as a destination connector
3. Define which data you want to transfer from Salesforce to BigQuery and how frequently
You can choose to self-host the pipeline using Airbyte Open Source or have it managed for you with Airbyte Cloud. 

ELT, standing for Extract, Load, Transform, is a modern take on the traditional ETL data integration process. In ELT, data is first extracted from various sources, loaded directly into a data warehouse, and then transformed. This approach enhances data processing speed, analytical flexibility and autonomy.

ETL and ELT are critical data integration strategies with key differences. ETL (Extract, Transform, Load) transforms data before loading, ideal for structured data. In contrast, ELT (Extract, Load, Transform) loads data before transformation, perfect for processing large, diverse data sets in modern data warehouses. ELT is becoming the new standard as it offers a lot more flexibility and autonomy to data analysts.

Warehouses and Lakes
Sales & Support Analytics

How to load data from Salesforce to BigQuery

Learn how to use Airbyte to synchronize your Salesforce data into BigQuery within minutes.

TL;DR

This can be done by building a data pipeline manually, usually a Python script (you can leverage a tool as Apache Airflow for this). This process can take more than a full week of development. Or it can be done in minutes on Airbyte in three easy steps:

  1. set up Salesforce as a source connector (using Auth, or usually an API key)
  2. set up BigQuery as a destination connector
  3. define which data you want to transfer and how frequently

You can choose to self-host the pipeline using Airbyte Open Source or have it managed for you with Airbyte Cloud.

This tutorial’s purpose is to show you how.

What is Salesforce

Salesforce is a cloud-based customer relationship management (CRM) platform providing business solutions software on a subscription basis. Salesforce is a huge force in the ecommerce world, helping businesses with marketing, commerce, service and sales, and enabling enterprises’ IT teams to collaborate easily from anywhere. Salesforces is the force behind many industries, offering healthcare, automotive, finance, media, communications, and manufacturing multichannel support. Its services are wide-ranging, with access to customer, partner, and developer communities as well as an app exchange marketplace.

What is BigQuery

BigQuery is an enterprise data warehouse that draws on the processing power of Google Cloud Storage to enable fast processing of SQL queries through massive datasets. BigQuery helps businesses select the most appropriate software provider to assemble their data, based on the platforms the business uses. Once a business’ data is acculumated, it is moved into BigQuery. The company controls access to the data, but BigQuery stores and processes it for greater speed and convenience.

Integrate Salesforce with BigQuery in minutes

Try for free now

Prerequisites

  1. A Salesforce account to transfer your customer data automatically from.
  2. A BigQuery account.
  3. An active Airbyte Cloud account, or you can also choose to use Airbyte Open Source locally. You can follow the instructions to set up Airbyte on your system using docker-compose.

Airbyte is an open-source data integration platform that consolidates and streamlines the process of extracting and loading data from multiple data sources to data warehouses. It offers pre-built connectors, including Salesforce and BigQuery, for seamless data migration.

When using Airbyte to move data from Salesforce to BigQuery, it extracts data from Salesforce using the source connector, converts it into a format BigQuery can ingest using the provided schema, and then loads it into BigQuery via the destination connector. This allows businesses to leverage their Salesforce data for advanced analytics and insights within BigQuery, simplifying the ETL process and saving significant time and resources.

Step 1: Set up Salesforce as a source connector

1. Open the Airbyte platform and navigate to the "Sources" tab on the left-hand side of the screen.

2. Click on the "Salesforce" source connector and select "Create new connection."

3. Enter a name for your connection and click "Next."

4. Enter your Salesforce credentials, including your username, password, and security token.

5. Click "Test connection" to ensure that your credentials are correct and that Airbyte can connect to your Salesforce account.

6. Once the connection is successful, select the objects you want to replicate from Salesforce.

7. Choose the replication frequency and any other settings you want to apply to your connection.

8. Click "Create connection" to save your settings and start replicating data from Salesforce to Airbyte.

9. You can monitor the progress of your replication in the "Connections" tab and view the data in the "Dashboard" tab.

Step 2: Set up BigQuery as a destination connector

1. First, navigate to the Airbyte dashboard and select the "Destinations" tab on the left-hand side of the screen.

2. Scroll down until you find the "BigQuery" destination connector and click on it.

3. Click the "Create Destination" button to begin setting up your BigQuery destination.

4. Enter your Google Cloud Platform project ID and service account credentials in the appropriate fields.

5. Next, select the dataset you want to use for your destination and enter the table prefix you want to use.

6. Choose the schema mapping for your data, which will determine how your data is organized in BigQuery.

7. Finally, review your settings and click the "Create Destination" button to complete the setup process.

8. Once your destination is created, you can begin configuring your source connectors to start syncing data to BigQuery.

9. To do this, navigate to the "Sources" tab on the left-hand side of the screen and select the source connector you want to use.

10. Follow the prompts to enter your source credentials and configure your sync settings.

11. When you reach the "Destination" step, select your BigQuery destination from the dropdown menu and choose the dataset and table prefix you want to use.

12. Review your settings and click the "Create Connection" button to start syncing data from your source to your BigQuery destination.

Step 3: Set up a connection to sync your Salesforce data to BigQuery

Once you've successfully connected Salesforce as a data source and BigQuery as a destination in Airbyte, you can set up a data pipeline between them with the following steps:

  1. Create a new connection: On the Airbyte dashboard, navigate to the 'Connections' tab and click the '+ New Connection' button.
  2. Choose your source: Select Salesforce from the dropdown list of your configured sources.
  3. Select your destination: Choose BigQuery from the dropdown list of your configured destinations.
  4. Configure your sync: Define the frequency of your data syncs based on your business needs. Airbyte allows both manual and automatic scheduling for your data refreshes.
  5. Select the data to sync: Choose the specific Salesforce objects you want to import data from towards BigQuery. You can sync all data or select specific tables and fields.
  6. Select the sync mode for your streams: Choose between full refreshes or incremental syncs (with deduplication if you want), and this for all streams or at the stream level. Incremental is only available for streams that have a primary cursor.
  7. Test your connection: Click the 'Test Connection' button to make sure that your setup works. If the connection test is successful, save your configuration.
  8. Start the sync: If the test passes, click 'Set Up Connection'. Airbyte will start moving data from Salesforce to BigQuery according to your settings.

Remember, Airbyte keeps your data in sync at the frequency you determine, ensuring your BigQuery data warehouse is always up-to-date with your Salesforce data.

Use Cases to transfer your Salesforce data to BigQuery

Integrating data from Salesforce to BigQuery provides several benefits. Here are a few use cases:

  1. Advanced Analytics: BigQuery’s powerful data processing capabilities enable you to perform complex queries and data analysis on your Salesforce data, extracting insights that wouldn't be possible within Salesforce alone.
  2. Data Consolidation: If you're using multiple other sources along with Salesforce, syncing to BigQuery allows you to centralize your data for a holistic view of your operations, and to set up a change data capture process so you never have any discrepancies in your data again.
  3. Historical Data Analysis: Salesforce has limits on historical data. Syncing data to BigQuery allows for long-term data retention and analysis of historical trends over time.
  4. Data Security and Compliance: BigQuery provides robust data security features. Syncing Salesforce data to BigQuery ensures your data is secured and allows for advanced data governance and compliance management.
  5. Scalability: BigQuery can handle large volumes of data without affecting performance, providing an ideal solution for growing businesses with expanding Salesforce data.
  6. Data Science and Machine Learning: By having Salesforce data in BigQuery, you can apply machine learning models to your data for predictive analytics, customer segmentation, and more.
  7. Reporting and Visualization: While Salesforce provides reporting tools, data visualization tools like Tableau, PowerBI, Looker (Google Data Studio) can connect to BigQuery, providing more advanced business intelligence options. If you have a Salesforce table that needs to be converted to a BigQuery table, Airbyte can do that automatically.

Wrapping Up

To summarize, this tutorial has shown you how to:

  1. Configure a Salesforce account as an Airbyte data source connector.
  2. Configure BigQuery as a data destination connector.
  3. Create an Airbyte data pipeline that will automatically be moving data directly from Salesforce to BigQuery after you set a schedule

With Airbyte, creating data pipelines take minutes, and the data integration possibilities are endless. Airbyte supports the largest catalog of API tools, databases, and files, among other sources. Airbyte's connectors are open-source, so you can add any custom objects to the connector, or even build a new connector from scratch without any local dev environment or any data engineer within 10 minutes with the no-code connector builder.

We look forward to seeing you make use of it! We invite you to join the conversation on our community Slack Channel, or sign up for our newsletter. You should also check out other Airbyte tutorials, and Airbyte’s content hub!

What should you do next?

Hope you enjoyed the reading. Here are the 3 ways we can help you in your data journey:

flag icon
Easily address your data movement needs with Airbyte Cloud
Take the first step towards extensible data movement infrastructure that will give a ton of time back to your data team. 
Get started with Airbyte for free
high five icon
Talk to a data infrastructure expert
Get a free consultation with an Airbyte expert to significantly improve your data movement infrastructure. 
Talk to sales
stars sparkling
Improve your data infrastructure knowledge
Subscribe to our monthly newsletter and get the community’s new enlightening content along with Airbyte’s progress in their mission to solve data integration once and for all.
Subscribe to newsletter

Connectors Used

By integrating marketing, sales, service, and IT teams into one platform, Salesforce has transformed the way businesses operate. However, in today’s changing data landscape, you cannot simply rely on Salesforce itself to derive maximum value for your business. In fact, you need a combination of Salesforce and a powerful data warehouse like Google’s BigQuery so you can open the doors to more robust analytical insights and in turn, drive increased revenue and growth.

In this recipe, we will explore the benefits of why you should consider moving data from your Salesforce to BigQuery, and then demonstrate how you can easily leverage Airbyte to do the job.

Why centralize data from Salesforce to a BigQuery?

Let’s look at some of the reasons why you might want to centralize your Salesforce data into a data warehouse.

Out-of-the-box reporting is not sufficient and difficult to use

While Salesforce is a powerful tool, its default data capabilities are limited. There are hard restrictions on reporting and dashboard capabilities, which makes it inflexible to use for different scenarios. Moreover, when analyzing historical data in Salesforce, the timing of the snapshots has to be planned in advance and cannot be changed on the fly.  On top of that, there are other limitations when it comes to large reports with over 100 fields.

Customizing Salesforce can be very expensive and time-consuming

Customizing Salesforce workflows is typically a multi-step process involving hiring certified Salesforce consultants, building an in-house development team, and ultimately collaborating. Once the solution is built, your staff will need to be trained to use it effectively. All of this not only takes time and effort, but can also be quite expensive. The cost of highly customized Salesforce implementations can range from $10,000 to well over $50,000 depending on the complexity of the company's internal processes.

Salesforce's pricing limits access

Salesforce's pricing model is based on pay-per-user, and purchasing an annual license is required to get started. This policy will likely force you to limit the number of Salesforce users in your enterprise to bring down costs. With limited possibilities of sharing, collaboration can be challenging - one of the reasons why Salesforce was implemented to begin with. For example, with this limitation, reports can only be shared with paid Salesforce users. Therefore a C-level executive who might only need to view a report will be unable to do so without paying a license fee.

Why use Airbyte to extract Salesforce data

Now that you realize the value of moving Salesforce data into a data warehouse, how do you implement that process?

In most cases, many businesses start by writing custom ETL scripts but the truth is that they don't succeed with them.  Manually writing scripts for this will slow down your project's velocity. Moreover, if these scripts are typically brittle — constant care and time need to be devoted to keep these scripts running. With automation, you can ditch the complex hardcoded scripts that handle data wrangling and scheduling, enabling your teams to work efficiently. Thanks to Airbyte, connectors are open-source and easily customizable. They help you seamlessly integrate your data that is residing across many business apps and databases in your data warehouse. With Airbyte, you get full control over your data in an effortless way. Data is deduplicated and can be transformed on the fly based on custom business logic rules with SQL. Airbyte has built-in scheduling, orchestration, and monitoring. Airbyte's ready-to-go scheduler enables you to replicate data either fully or in an incremental fashion, removing any manual intervention and allowing your developers to focus on more critical matters.

Now, let’s get started with the how-to’s of using Airbyte to replicate data from Salesforce to BigQuery.

Prerequisites

Below are the prerequisite tools you’ll need to get started on backing up your Salesforce data to your Google BigQuery.

  1. You’ll need to get Airbyte to do the data replication for you. To deploy Airbyte, follow the simple instructions in our documentation here.
  2. You will need a Salesforce account.
  3. You also need a Google Cloud Platform account with the BigQuery service enabled.

Salesforce accounts can be created by signing up at the link here. Note: You will need at least a developer account for Airbyte to be able to access Salesforce REST APIs. To set up and create a GCP account with the BigQuery service enabled, follow the instructions at the link here.


{{COMPONENT_CTA}}

Methods to Move Data From Salesforce to Bigquery 

  • Method 1: Connecting Salesforce to Bigquery using Airbyte.
  • Method 2: Connecting Salesforce to Bigquery manually.

Method 1: Connecting Salesforce to Bigquery using Airbyte.

Configure your Salesforce account

The first step is to configure your Salesforce account to allow external applications to connect and access data from the account. Login to Salesforce and go to Setup > Create > Apps and select New in the Connected Apps section.

Fill in the required fields.

Next, enable the OAuth settings, enter https://login.salesforce.com/ under Callback URL and select the following Oauth Scopes.

Save the connected app. Once saved you should be able to see your Consumer Key and Consumer Secret. Make a note of these values which will be used later.

Next you will have to allow access to the connected apps and generate an authorization code which will then be used to get your refresh token which is required to configure Airbyte for Salesforce.

Login to Salesforce and in a new browser tab, go to the following URL: https://.salesforce.com/services/oauth2/authorize?response_type=code&client_id=&redirect_uri=https://login.salesforce.com/

can be found in your Salesforce account verification email. After hitting the URL, you will be prompted to allow access.

Copy the value following code in the URL. This will be used as the authorization code in the next step.

Next you will need to make a POST request to https://.salesforce.com/services/oauth2/token with the following parameters.

Set client_id to , code to the authorization code from the previous step, grant_type to authorization_code, client_secret to and the redirect_url to https://login.salesforce.com/

The response will contain a value for refresh_token which will be required to configure Airbyte.

Add sample data to Salesforce

In the next step we will generate and import sample data into Salesforce. For this example we will create Leads data. Go to https://www.mockaroo.com/ and create the Leads dataset with the following fields.

This will generate a CSV with sample data.

Next login to Salesforce and go to Setup > Data > Data Import Wizard. Choose the Leads object, upload the CSV and follow the Wizard steps to upload the data.

Once complete, you can view the data by going to the Salesforce homepage > Leads.

Set up Google BigQuery

The next step is to create a BigQuery dataset and generate a credentials JSON file required to configure Airbyte. Login to your GCP account and go to BigQuery.

Select Create a Dataset and give and add the required information.

Next, go to the Service Account page and Create a new Service account. Enter the required information. Grant the service account the BigQuery Data Owner role.

Once the service account is created, go to Keys > Add Key and create a new key. You will be prompted to download a credentials file. Download the JSON version which will be used later.

Set up Salesforce as your Airbyte source

Next, set up the connection for the source, which will be your Salesforce account. Under client_id, enter , under client_secret enter and under refresh_token, enter the refresh token obtained at the end of Step 1.

Set up BigQuery as your Airbyte destination

Next,  set up Airbyte to use BigQuery as the destination for the data replication. Enter your GCP project-id, dataset ID, and dataset location. Copy the contents of the credentials JSON.

Create a Salesforce to BigQuery connection

Once configured, a list of Salesforce streams that data can be backed up.

Scroll through and select the Leads stream that contains the sample data.  

Note: You need to have billing enabled in your BigQuery service for normalization to work without any errors.

Once configured you can manually trigger a sync. Once complete, your data will be backed up to BigQuery.

You can see two tables created in your dataset. The Lead table contains the normalized data.

You can also view your data by going to the dataset and going to the _airbyte_raw_lead table.

You can test out the incremental Sync Append by generating another sample data file and uploading it to Salesforce. Running the sync again will add the additional items to BigQuery.

In this case, an additional 1065 items were added. You can verify the total row count in your dataset by running the following in the BigQuery UI:


Method 2: Connecting Salesforce to Bigquery manually.

To manually connect Salesforce to BigQuery without relying on third-party tools, you will need to perform a series of steps that involve extracting data from Salesforce, preparing it for BigQuery, and then loading it into BigQuery. Below is a high-level guide on how to do this:

Step 1: Extract Data from Salesforce

  1. Use Salesforce Reports or Data Export Service:
    • You can manually generate reports or use the data export service provided by Salesforce to extract your data.
    • Schedule or perform an export of the relevant objects (e.g., Leads, Opportunities, Contacts).
  2. Use Salesforce APIs:
    • Utilize the Salesforce REST API or Bulk API to programmatically extract data.
    • Write a script or use a command-line tool like curl to make API requests and retrieve the data.

Step 2: Prepare Data for BigQuery

  1. Format the Data:
    • Ensure that the data extracted from Salesforce is in a format supported by BigQuery (CSV, JSON, Avro, or Parquet).
    • Clean and transform the data if necessary, making sure to handle any data type discrepancies.
  2. Compress the Data (Optional):
    • BigQuery supports compressed data formats, which can save on storage and improve load times.
    • Use tools like gzip to compress your CSV or JSON files.
  3. Split Large Data Files (Optional):
    • If you have very large data files, consider splitting them into smaller chunks to make the upload process more manageable and potentially parallelize the load operation.

Step 3: Upload Data to Google Cloud Storage (GCS)

  1. Create a Bucket:
    • Go to the Google Cloud Console and create a new storage bucket in Google Cloud Storage if you don't already have one.
  2. Upload Files:
    • Use the Google Cloud Console, gsutil, or the Google Cloud Storage API to upload your prepared data files to the GCS bucket.

Step 4: Load Data into BigQuery

  1. Create a Dataset and Table in BigQuery:
    • In the Google Cloud Console, navigate to BigQuery and create a new dataset.
    • Define a table schema that matches the structure of your Salesforce data.
  2. Load Data from GCS into BigQuery:
    • Use the BigQuery Web UI, bq command-line tool, or the BigQuery API to create a load job.
    • Specify the GCS file path, the table you're loading the data into, and any additional configurations (such as field delimiters, skip header rows, etc.).

Step 5: Verify Data Integrity

  1. Check the Load Job:
    • After the load job completes, check for any errors or warnings that may have occurred during the import process.
  2. Query the Data:
    • Run some test queries in BigQuery to ensure that the data has been loaded correctly and matches your expectations.

Step 6: Automate the Process (Optional)

  1. Scripting:
    • To avoid manual repetition, you can write scripts to automate the extraction, transformation, and loading processes.
  2. Cloud Functions or Cloud Workflows:
    • Use Google Cloud Functions or Cloud Workflows to orchestrate and automate the data pipeline.
  3. Schedule Regular Updates:
    • Set up a schedule to regularly extract data from Salesforce and update your BigQuery dataset.

Keep in mind that this manual process can be time-consuming and may require maintenance. If you find that you need to perform this operation regularly or with large volumes of data, consider using a data pipleine tool like Airbyte.

Wrapping up

Now that you have replicated your Salesforce data to Google BigQuery, you can leverage the rich analytical capabilities of BigQuery to extract more insights from this data. Good luck, and we wish you all the best using Airbyte!

Now that you've replicated your Salesforce data to Google BigQuery, checkout another article to discover how Google BigQuery Sandbox can amplify your data insights journey after replicating Salesforce data.

Join the conversation at Airbyte’s community Slack Channel to share your ideas with over 1000 data engineers and help make everyone’s project successful.

What should you do next?

Hope you enjoyed the reading. Here are the 3 ways we can help you in your data journey:

flag icon
Easily address your data movement needs with Airbyte Cloud
Take the first step towards extensible data movement infrastructure that will give a ton of time back to your data team. 
Get started with Airbyte for free
high five icon
Talk to a data infrastructure expert
Get a free consultation with an Airbyte expert to significantly improve your data movement infrastructure. 
Talk to sales
stars sparkling
Improve your data infrastructure knowledge
Subscribe to our monthly newsletter and get the community’s new enlightening content along with Airbyte’s progress in their mission to solve data integration once and for all.
Subscribe to newsletter

Connectors Used

Frequently Asked Questions

What data can you extract from Salesforce?

Salesforce's API provides access to a wide range of data types, including:  

1. Accounts: Information about customer accounts, including contact details, billing information, and purchase history.  

2. Leads: Data on potential customers, including contact information, lead source, and lead status.  

3. Opportunities: Information on potential sales deals, including deal size, stage, and probability of closing.  

4. Contacts: Details on individual contacts associated with customer accounts, including contact information and activity history.  

5. Cases: Information on customer service cases, including case details, status, and resolution.  

6. Products: Data on products and services offered by the company, including pricing, availability, and product descriptions.  

7. Campaigns: Information on marketing campaigns, including campaign details, status, and results.  

8. Reports and Dashboards: Access to pre-built and custom reports and dashboards that provide insights into sales, marketing, and customer service performance.  

9. Custom Objects: Ability to access and manipulate custom objects created by the organization to store specific types of data.  

Overall, Salesforce's API provides access to a comprehensive set of data types that enable organizations to manage and analyze their customer relationships, sales processes, and marketing campaigns.

What data can you transfer to BigQuery?

You can transfer a wide variety of data to BigQuery. This usually includes structured, semi-structured, and unstructured data like transaction records, log files, JSON data, CSV files, and more, allowing robust, scalable data integration and analysis.

What are top ETL tools to transfer data from Salesforce to BigQuery?

The most prominent ETL tools to transfer data from Salesforce to BigQuery include:

  • Airbyte
  • Fivetran
  • Stitch
  • Matillion
  • Talend Data Integration

These tools help in extracting data from Salesforce and various sources (APIs, databases, and more), transforming it efficiently, and loading it into BigQuery and other databases, data warehouses and data lakes, enhancing data management capabilities.

What should you do next?

Hope you enjoyed the reading. Here are the 3 ways we can help you in your data journey:

flag icon
Easily address your data movement needs with Airbyte Cloud
Take the first step towards extensible data movement infrastructure that will give a ton of time back to your data team. 
Get started with Airbyte for free
high five icon
Talk to a data infrastructure expert
Get a free consultation with an Airbyte expert to significantly improve your data movement infrastructure. 
Talk to sales
stars sparkling
Improve your data infrastructure knowledge
Subscribe to our monthly newsletter and get the community’s new enlightening content along with Airbyte’s progress in their mission to solve data integration once and for all.
Subscribe to newsletter

Connectors Used