If you like to connect Salesforce CDP (Cloud Data Platform) in some apps like Power BI or other ODBC Compliant apps such as Informatica, Python, Crystal Reports then try steps listed in this post.
Prerequisite
- Download [official JDBC driver for Salesforce CDP (Cloud Data Platform) from here] and extract to some folder e.g. c:\jdbc\salesforce-cdp
- Download and Install ZappySys ODBC PowerPack.
Create OAuth App (Get ClientId and ClientSecret)
In order to use Salesforce CDP JDBC Driver you will need ClientId and ClientSecet (It doesnt support the Traditional UserId and Password method) here is how to obtain ClientId and Secret
- Follow these steps to register Salesforce App and obtain Client ID / Secret (for API Call / OAuth). Change steps a little bit to include the following permissions. You will need the following permissions
api
full
cdp_profile_api
cdp_query_api
refresh_token, offline_access
NOTE: You can exclude refresh_token, offline_access, full after some testing see it works for your case
Here is one more article [Connect Tableau Server to the Salesforce Data Cloud - Tableau]
- Once you configured the app it may look like below. Click on manage credentials to obtain clientid and client secret which we will need later.
Configure JDBC-ODBC Connection
-
Create OAuth App for Salesforce and Obtain ClientId and ClientSecret with steps Here’s the documentation for setting up a connected app with OAuth.
-
Open ODBC Data Sources (x64):
-
If you want access for yourself then stay of User DSN Tab. If you want grant access other users then go to the System DSN tab. For SQL Server Integration go to System Tab and add new System DSN rather than User DSN. Click New button.
-
From the Driver list Select ZappySys ODBC Driver. For this example select [ZappySys JDBC Bridge Driver].
-
Enter the following values on JDBC Bridge UI
Connection String:jdbc:queryService-jdbc:https://login.salesforce.com
JDBC Driver File(s):c:\some-folder\Salesforce-CDP-jdbc-x.y.z.jar
Username/password:<optional and may not be needed>
Connection Parameters:Click Edit button to add 2 key/value pairs - ClientId and ClientSecret
-
Add ClientId and ClientSecert Like below
-
Click Test Connection see it works?
-
Go to Preview Tab to query some data (Enter a simple query and click Preview Data button
Load Salesforce CDP data into Power BI
Once DSN is created you can now use DSN in Power BI. Click here to learn how to connect JDBC Driver in PowerBI
NOTE: Salesforce CDP Driver doesnt work with Table mode in Power BI so you will have to use Query Mode as below during connection / import data wizard step. Future version of ZappySys JDBC Bridge might support table import mode but for now try below when prompted.