How to connect Salesforce to Google BigQuery

If you’re moving data between Salesforce and Google BigQuery, it’s time to stop copy-pasting and start synchronizing. You may scale fast or try to get cleaner insights; this integration brings the CRM and analytics under one roof. No more second-guessing reports or waiting on data dumps. In this guide, we’ll walk you through how to connect the dots. Simply, smartly, and without the fluff.  

Table of Contents

  1. Why Integrate Salesforce with Google BigQuery? 
  2. What Are Salesforce and Google BigQuery?  
  3. Available Methods to Connect Salesforce to BigQuery  
  4. Method 1: Manual Salesforce to BigQuery Integration (Custom API)
  5. Method 2: No-Code Salesforce to BigQuery Integration 
  6. Method 3: Custom Coding 
  7. Benefits of Salesforce and Google BigQuery connection 
  8. Conclusion

Why Integrate Salesforce with Google BigQuery? 

Connecting the two is a no-brainer if you’re running Salesforce for CRM and using BigQuery for analytics. You’re already behind when your sales and marketing data live in one place and your reporting stack lives somewhere else. 

Syncing Salesforce with BigQuery lets you: 

  • Build live BI dashboards your execs can actually trust. 
  • Track marketing attribution end-to-end, from ad click to closed deal. 
  • Get sharper sales forecasting using real-time pipeline data. 
  • Ditch clunky CSV exports and start automating insights. 

Without the integration? You’re stuck with manual data pulls, mismatched metrics, and teams making decisions off outdated info. It slows down everything from campaign optimizations to boardroom reporting. 

Hooking these two platforms together opens the door to fast, reliable, always-on analytics. 

This article describes the possible ways to integrate Salesforce CRM and Google BigQuery data warehouse, their pros, cons, and the best use cases. 

What Are Salesforce and Google BigQuery?  

Before diving into how to connect these two systems, we have to ensure what these platforms do and why pairing them up is such a decisive move. 

What is Salesforce? 

This go-to CRM tracks leads, manages customer relationships, and aligns the sales and marketing teams. Whether you’re closing deals or building campaigns, it’s where all your customer data lives. Think of it as the sales engine and marketing control room rolled into one. 

What is Google BigQuery? 

This Google Cloud’s serverless data warehouse handles massive datasets fast. It’s built for speed, scalability, and SQL-based analysis. No infrastructure headaches, no waiting around for results. If Salesforce is your data source, BigQuery is where the magic happens: analytics, dashboards, machine learning, etc. 

Available Methods to Connect Salesforce to BigQuery  

There are multiple ways to get the Salesforce data flowing into BigQuery. Here are the three main options, each with its trade-offs depending on your team’s skillset, goals, and how hands-on you want to be. 

  • Method 1: Custom Integration via API. This approach taps into the Salesforce and BigQuery APIs directly. It’s powerful and flexible. You can tailor the flow to exactly what you need. But it also means dealing with OAuth tokens, API quotas, pagination, error handling, etc. You’ll need a dev team or strong technical chops to clean it. 
  • Method 2: No-Code Integration. If you’d rather skip the code and let a tool do the heavy lifting, Skyvia’s a great pick. It’s a no-code cloud integration platform that connects Salesforce and BigQuery with just a few clicks. You can schedule syncs, map fields, monitor flows, and even handle incremental updates from the browser. 
  • Method 3: Custom Coding. Think Python scripts, middleware apps, or ETL pipelines using tools like Airflow or dbt. This approach gives users total control over the data flow, transformation logic, and scheduling. But they’re also responsible for building and maintaining everything. Great for engineering teams that want to fine-tune every step. 

Which Salesforce to BigQuery Method Should You Choose? 

Let’s briefly compare these approaches. 

Criteria Custom API Integration No-Code Integration Custom Coding 
Skill Level Required Advanced Beginner to Intermediate Advanced 
Scalability High Moderate to High High (with effort) 
Maintenance Needs Ongoing upkeep required. Low. Managed platform. High. You’re on the hook. 
Real-Time Support Possible, but complex. Near real-time supported. Possible with effort. 
Data Transformation Full control; custom logic. Built-in, user-friendly tools. Total flexibility. 
Security High, you control everything. Managed by platform. Depends on implementation. 
Costs Development and maintenance. Subscription-based, predictable. Variable:  infrastructure + dev. 
Best For Complex, highly customized integrations. Fast, no-code integrations with minimal fuss. Full control, complex ETL pipelines. 

Method 1: Manual Salesforce to BigQuery Integration (Custom API)  

This approach involves building your own pipeline by pulling data from Salesforce using its API, shaping that data how you want it, and then loading it into BigQuery, either directly or through Google Cloud Storage (GCS). It’s the most hands-on method, giving you full control but demanding coding skills and ongoing care. 

Best For 

  • Teams with strong developer resources. 
  • Projects needing fine-tuned, custom data flows. 
  • Complex schemas or business rules that off-the-shelf tools can’t handle. 

Pros 

  • Total control over data extraction, transformation, and loading. 
  • It can be optimized for performance and security. 
  • Flexibility to implement real-time or near-real-time syncing. 

Cons 

  • Requires advanced API and dev skills. 
  • It can be time-consuming to build and maintain. 
  • Handling errors, rate limits, and auth tokens adds complexity. 

Step-by-step Guide  

Step 1: Extract Data from Salesforce API 

  • Register a connected app in Salesforce for OAuth credentials. 
  • Obtain an OAuth access token. 
  • Use REST API endpoint to pull data (e.g., /services/data/vXX.X/query/?q=SOQL). 
  • Handle pagination and API limits. 

Sample Python snippet to get data: 

import requests 
# Set up OAuth token and endpoint 
access_token = 'YOUR_ACCESS_TOKEN' 
instance_url = 'https://yourInstance.salesforce.com' 
query = "SELECT Id, Name FROM Account LIMIT 100" 
headers = { 
    'Authorization': f'Bearer {access_token}', 
    'Content-Type': 'application/json' 
} 
response = requests.get(f'{instance_url}/services/data/v54.0/query/?q={query}', headers=headers) 
data = response.json() 
print(data)

Step 2: Transform and Prepare the Data 

  • Parse JSON data into a flat structure. 
  • Clean or format fields as needed (dates, booleans, nested objects). 
  • Save transformed data as CSV or JSON for BigQuery ingestion. 

Sample Python snippet to flatten and save CSV: 

import pandas as pd 
from pandas import json_normalize 
records = data['records']  # from previous step 
df = json_normalize(records) 
# Clean columns or format as needed 
df.to_csv('salesforce_data.csv', index=False)

Step 3: Load into BigQuery via GCS or Direct 

  • Upload files to the Google Cloud Storage bucket (if using staging). 
  • Use BigQuery UI or client library to load data from GCS or stream directly. 
  • Monitor load jobs and handle errors. 

Sample Python snippet to load CSV from GCS to BigQuery:

from google.cloud import bigquery 
client = bigquery.Client() 
table_id = 'your-project.your_dataset.your_table' 
job_config = bigquery.LoadJobConfig( 
    source_format=bigquery.SourceFormat.CSV, 
    skip_leading_rows=1, 
    autodetect=True, 
) 
uri = 'gs://your-bucket/salesforce_data.csv' 
load_job = client.load_table_from_uri( 
    uri, 
    table_id, 
    job_config=job_config 
) 
load_job.result()  # Waits for the job to complete. 
print(f"Loaded {load_job.output_rows} rows into {table_id}.") 

Method 2: No-Code Salesforce to BigQuery Integration 

If coding isn’t your strong skill or you want to get things moving fast, using a no-code platform like Skyvia is the way to go. It handles ETL, ELT, reverse ETL, automating workflows, cloud-to-cloud backup, data management, and connectivity while you focus on what data to move and when. Perfect if you want a solid integration without the headaches of writing custom code. 

Best For 

  • Business analysts, marketers, and non-developers. 
  • Teams needing quick setups with minimal fuss. 
  • Projects where reliability and ease of use trump full customization. 

Pros 

  • No coding required: drag, drop, and configure. 
  • Managed platform means less maintenance and monitoring. 
  • It supports scheduling and incremental updates that are out of the box. 
  • Clear UI for mapping fields and monitoring syncs. 

Cons 

  • Less flexibility for highly custom data transformations. 
  • Some complex use cases might require manual tweaking outside the platform. 
  • Limited control over error handling and recovery in large, complex syncs. 

Step-by-step Guide 

Before starting your integration journey, register in Skyvia to create connections to Salesforce and Google BigQuery.  

It takes a few steps to implement different Salesforce and Google BigQuery integration scenarios here. You can: 

  • Replicate Salesforce objects and data to BigQuery. 
  • Enrich Salesforce data with data from BigQuery. 
  • Build complicated flows involving other cloud apps or databases.  

Step 1: Create Salesforce Connection 

  1. Log in to Skyvia. 
  2. Click + Create New > Connection
Skyvia interface
  1. Select Salesforce as the connector, enter appropriate credentials, and authorize access. Note that Salesforce supports two authentication methods: OAuth and Username & Password.
Salesforce connection

Step 2: Create BigQuery Connection 

Similarly, create a new BigQuery connection. You’ll upload your Google service account JSON key and select the target dataset. 

Note that there are also two authentication methods for Google BigQuery: user account or JSON key. Also, the information about the Project Id and the DataSet Id can be found in the Google API Console.

Google BigQuery connection by Skyvia

Step 3: Use Skyvia Import or Replication 

Create a new import or replication task. Choose Salesforce as the source and BigQuery as the destination.

Skyvia Import  

With Skyvia Import, you can enrich Salesforce data with BigQuery data. This scenario allows loading CSV files manually (when needed) and automatically on a schedule.  
To set up the Import integration in Skyvia:  

  1. Log in to Skyvia, click +Create NEW in the top menu, and select Import in the Integration section.   
  2. Click on the Data Source database or cloud app Source type and select BigQuery connection.   
  3. Select Salesforce connection as a Target. 
  4. Click Add new to create an integration task. You can add multiple tasks in one integration.
Google BigQuery connection by Skyvia
  1. Select the object to import data from and use filters to limit the number of records if needed.
Task Editor by Skyvia
  1. Specify the object to import data to and select the action to perform. 
Task Editor by Skyvia
  1. Assign field mapping. Skyvia maps the fields with the same names automatically. 
Task Editor by Skyvia
  1. Run the integration and monitor the results, the same as described above. 
Skyvia Replication  

Replication copies the Salesforce data structure and the data itself and then creates the same data structure in BigQuery and keeps it updated if needed. The example below shows how to replicate available Salesforce objects and data to BigQuery.  
 
To create replication integration:   

  1. Log in to Skyvia, click +Create NEW in the top menu, go to the Integration section, and select Replication.   
  2. Select the Salesforce connection as a Source and BigQuery connection as a Target.   
  3. Choose the objects and fields to replicate. You can set filters to limit the copied records if needed.   
  4. Enable or disable the available integration options.  
  5. The Incremental Updates option is enabled by default. It allows replicating only changes made to the source records.
Salesforce connection by Skyvia
  1. Click Schedule to set the integration schedule for the automatic run if needed. 
Automated schedule for integration by Skyvia
  1. Run the integration and monitor the results. Skyvia keeps the results of each integration run and allows checking the number of successful and failed records using the integration run history. Use the Monitor and Log tabs to capture the run results. Click on the specific run to see the details. 
Data integration monitoring by Skyvia
  1. As a result, you have a copy of Salesforce data in the BigQuery warehouse.

Method 3: Custom Coding 

With custom coding, you can write your own scripts or apps in Java, Python, or whatever suits your team. That handles extraction, transformation, and loading exactly how you want. This method allows maximum control and flexibility, letting them fine-tune every step of the data journey. 

But heads up, it’s not a walk in the park. Building a reliable, scalable pipeline takes serious programming resources and plenty of time. Plus, as the data landscape shifts or your platforms evolve, you’ll need to keep updating the code to keep everything humming smoothly. 

Best For 

Engineering teams with deep knowledge of programming languages and an understanding of business analytics needs. 

  • Use cases demanding custom business logic and transformations. 
  • Organizations ready to invest in building and maintaining bespoke pipelines. 

Pros 

  • Full control over data flows, transformation, and error handling. 
  • Ability to handle complex or niche business requirements. 
  • No dependence on third-party tools or vendors. 
  • Can scale and optimize performance to fit your environment. 

Cons 

  • It requires multiple developers who really get both Salesforce and BigQuery internals. 
  • You have to handle every little quirk and edge case yourself. 
  • Need dedicated testing and validation to ensure data completeness and quality. 
  • Frequent code updates needed with any business or platform changes. 

Benefits of Salesforce and Google BigQuery connection 

Salesforce is a CRM giant that provides services for most business processes. Google BigQuery is a manageable and scalable serverless technology set designed to meet modern demand challenges of petabyte-scale data storage, networking, and sub-second query response times. Google BigQuery and Salesforce integration combines the best Salesforce and BigQuery capabilities. 

  • You can transfer Salesforce data to BigQuery to keep a copy of your Salesforce data in a secure, serverless environment, not worrying about storage space.   
  • There is no need to build and maintain complicated on-premises infrastructure, as BigQuery is a cloud-based serverless technology.   
  • You can build efficient collaboration between teams by consolidating data from different Salesforce services into BigQuery for custom reporting, analysis, and visualization by BigQuery means. 

Conclusion

  • If you’ve got a strong dev team and need absolute control with custom logic, Method 3 (Custom Coding) is your playground. But be ready to roll up the sleeves for a serious build-and-maintain job. 
  • If you want something faster, easier, and without the coding headache, Method 2 (No-Code with Skyvia) is where most users find their sweet spot. It’s reliable, flexible enough for most use cases, and lets companies focus on what really matters: just data, not the plumbing. 
  • And if you’re all about precision but don’t mind some hands-on work, Method 1 (Manual API Integration) gives you the best of both worlds: control without the full DIY marathon. 

Companies that are just starting or want to skip the tech stress might give Skyvia a shot. Setting up is a breeze, and you can see results fast. Plus, it grows with you as your data needs evolve.

discover our pricing

F.A.Q. for Salesforce to Google BigQuery

You can extract standard and custom objects, including Leads, Contacts, Accounts, Opportunities, Cases, Activities, and custom fields. API access lets you query almost any structured CRM data stored in Salesforce. 

Yes. Tools like Skyvia, Fivetran, and Airbyte support scheduled, incremental syncs to keep BigQuery up to date with Salesforce datawithout manual exports. Automation can run daily, hourly, or in near real time, depending on the tool and plan.

Not necessarily. No-code platforms like Skyvia allow full setup via a browser-based UI. However, manual integrations using the Salesforce API or Google Cloud SDK require familiarity with Python, REST, and SQL. 

Some common hurdles include API rate limits, data type mismatches, and flattening nested fields from Salesforce. Using a managed ETL tool helps address these with built-in mapping and error handling. 

Nata Kuznetsova
Nata Kuznetsova
Nata Kuznetsova is a seasoned writer with nearly two decades of experience in technical documentation and user support. With a strong background in IT, she offers valuable insights into data integration, backup solutions, software, and technology trends.

TOPICS

BY CONNECTORS

Skyvia podcast