In Part 1 of our two-part series on connecting Google BigQuery with Salesforce Data Cloud, we explained how to share data from BigQuery to Data Cloud (Data In). In this post, we’ll show you how to share data from Data Cloud to Google BigQuery (Data Out). We’ll use Data Cloud’s Zero Copy Integration capabilities for seamless, bi-directional data sharing that does not rely on an exact, transform, and load (ETL) process.
What is Google BigQuery?
Google BigQuery is a fully managed, serverless data warehouse that enables scalable analysis across petabytes of data. It is a part of the Google Cloud Platform, providing a powerful SQL engine to run fast queries against large datasets. Developers use BigQuery to perform big data analytics, harnessing Google’s infrastructure to analyze data in real-time. They can also integrate BigQuery with other Google Cloud services or third-party tools to ingest, store, and visualize data.
Data Sharing Using Zero Copy data share
As part of the Zero Copy data sharing capability, we introduced the concept of “data sharing,” which allows users to assemble a set of data objects from Salesforce Data Cloud and link them with Google BigQuery as the data sharing target. After linking the data share objects with their respective targets, a connection is forged between Salesforce and BigQuery via Analytics Hub. This allows the objects to be natively presented as tables or views within the BigQuery console.
After establishing data sharing in Salesforce Data Cloud and connecting it to Google BigQuery, the integration enables almost instantaneous access to the objects, ensuring that BigQuery displays the most current data. Specifically, if the data is in Salesforce Data Cloud, it can reside there because now Salesforce Data Cloud can serve as the host of a supplemental and rich unified dataset for analysis to be done in BigQuery.
Using Data Cloud’s no-code and low-code tools, you can create a data share target, link the data share objects with Google BigQuery to generate BI visualizations, build ML models using the Google Vertex AI platform, and consume the data for downstream processing.
Create the Data Share Target
First, a Data Share Target will need to be created. A Data Share Target can be created by navigating to the Data Share Target tab in the Data Cloud application, then clicking “New.” Next, select “Google BigQuery.”
Next, enter a name for Data Share Target in the label field. The API name will be automatically populated. Next, enter the principal that you want to use to make the connection. The principal entered should be in the form of an email address. Make sure that the principal has BigQuery permissions.
The page will redirect to a sign-in page, like the one shown below. Choose the account you want to use.
The page will redirect to another page. Click continue.
The connection between Salesforce Data Cloud and Google BigQuery is successful when the Data Share Target status is “Active”, and the Authentication status is “Successful.”
Create the Data Share
Navigate to the “Data Shares” tab and click “New”. Enter a name for the Data Share in the “Label” field. Select a Data Space to associate the Data Share to. Enter an optional description.
Select the objects that you want to share. There is the option to share either Data Lake Objects, Data Model Objects, or Calculated Insights. We’ll start by sharing three data model objects within the Profile category: Unified Individual, Unified Contact Point Phone, and Unified Contact Point Email. Click save.
Click Link/Unlink Data Share Target in the top right corner to link the Data Share Target that was created earlier.
Choose the Data Share Target to link and click save. This is where the power of Salesforce Data Cloud will be evident. Once the data share object is linked with the Google BigQuery user or a Group, the objects within that category will appear with minimal latency in BigQuery.
View objects in BigQuery
In BigQuery navigate to Analytics Hub.
In Analytics Hub click Search Listings.
Locate the data share from Salesforce Data Cloud and click it.
Click + Add Dataset to Project to add the data model objects to BigQuery.
In the Explorer tab of BigQuery you should see your Data Share from Salesforce Data Cloud and the data model objects.
To query a data model object in BigQuery click the three vertical dots next to the data model object and select Query. This will open a new window.
You can add the fields that you wish to query and click Run. In the below example we are getting ID, first name, last name, and email from the Unified Individual Data Model Object. After you click run the results will show under Query Results. You can then use this data with BigQuery’s functionality like creating data sets, tables, and downloadable files with the data.
Conclusion
The seamless integration of Google BigQuery with Data Cloud using the Zero Copy strategy represents a monumental shift from ETL for developers. By effectively breaking down data silos, this approach not only streamlines the aggregation and analysis of diverse data types but also significantly enhances the ability to deliver personalized customer experiences.
Be sure to read Part 1 of our series on Google BigQuery and Data Cloud, where we focus on sharing data from BigQuery to Salesforce (data in).
Explore our new partnership page to discover more about the collaboration between Salesforce and Google.
Further resources
- Salesforce and Google announcement
- Spring 24 Release Notes on BYOL data share
- Trailhead module: Get to Know Data Cloud: Quick Look
- Trailhead module: BYOL Data Shares in Data Cloud: Quick Look
About the authors
Danielle Larregui is a Senior Developer Advocate at Salesforce focusing on the Data Cloud platform. She enjoys learning about cloud technologies, speaking at and attending tech conferences, and engaging with technical communities. You can follow her on X(Twitter).
Gina Nichols is a Director on the Salesforce Data Cloud product team. She has a background as an architect working with some of Salesforce’s enterprise customers in the MarTech space. She is also a co-author of the award-winning, Transform the Consumer Experience Customer 360 Guide, which won an award of Merit at the STC Chicago competition. You can follow her on LinkedIn.