Connect to Salesforce CRM Analytics Data in Aqua Data Studio
The CData JDBC Driver for Salesforce CRM Analytics integrates Salesforce CRM Analytics data with wizards and analytics in IDEs like Aqua Data Studio. This article shows how to connect to Salesforce CRM Analytics data through the connection manager and execute queries.
Create a JDBC Data Source
You can use the connection manager to define connection properties and save them in a new JDBC data source. The Salesforce CRM Analytics data source can then be accessed from Aqua Data Studio tools.
- In Aqua Data Studio, select Register Server from the Servers menu.
- In the Register Server form, select the 'Generic - JDBC' connection.
- Enter the following JDBC connection properties:
- Name: Enter a name for the data source; for example, Salesforce CRM Analytics.
- Driver Location: Click the Browse button and select the cdata.jdbc.salesforcecrmanalytics.jar file, located in the lib subfolder of the installation directory.
- Driver: Enter the Driver's class name, cdata.jdbc.salesforcecrmanalytics.SalesforceCRMAnalyticsDriver.
URL: Enter the JDBC URL, which starts with jdbc:salesforcecrmanalytics: and is followed by a semicolon-separated list of connection properties.
Salesforce CRM Analytics uses the OAuth 2 authentication standard. Obtain the OAuthClientId and OAuthClientSecret by registering an app with Salesforce CRM Analytics.
See the Getting Started section of the Help documentation for an authentication guide.
Multi-Factor Authentication (MFA)
If the connected Salesforce org has MFA enforcement enabled, set MFACode to the time-based one-time passcode (TOTP) generated by your authenticator app (such as Salesforce Authenticator or Google Authenticator). MFACode applies alongside the standard OAuth flow.
Built-in Connection String Designer
For assistance in constructing the JDBC URL, use the connection string designer built into the Salesforce CRM Analytics JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.
java -jar cdata.jdbc.salesforcecrmanalytics.jarFill in the connection properties and copy the connection string to the clipboard.
A typical JDBC URL is below:jdbc:salesforcecrmanalytics:OAuthClientId=MyConsumerKey;OAuthClientSecret=MyConsumerSecret;CallbackURL=http://localhost:portNumber;InitiateOAuth=GETANDREFRESH;MFACode=YourMFACode
Query Salesforce CRM Analytics Data
You can now query the tables exposed.