VOOZH about

URL: https://www.cdata.com/kb/tech/salesforce-jdbc-tableau.rst

โ‡ฑ Visualize Salesforce Data from Tableau


Visualize Salesforce Data from Tableau

๐Ÿ‘ Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Use the Tableau Desktop business intelligence tool to connect to Salesforce data.

With CData Drivers for Salesforce, you can use data access standards to unlock connectivity to business intelligence tools like Tableau. The CData JDBC Driver for Salesforce allows you to connect from Tableau on Windows and macOS. This article covers how to discover schemas and query Salesforce data data in real-time.

NOTE: If you are using Tableau 2020.3 or higher, you can use the CData Tableau Connector. If you wish to connect to Salesforce data in Tableau Cloud, you will need to use CData Connect AI.

About Salesforce Data Integration

Accessing and integrating live data from Salesforce has never been easier with CData. Customers rely on CData connectivity to:

  • Access to custom entities and fields means Salesforce users get access to all of Salesforce.
  • Create atomic and batch update operations.
  • Read, write, update, and delete their Salesforce data.
  • Leverage the latest Salesforce features and functionalities with support for SOAP API versions 30.0.
  • See improved performance based on SOQL support to push complex queries down to Salesforce servers.
  • Use SQL stored procedures to perform actions like creating, retrieving, aborting, and deleting jobs, uploading and downloading attachments and documents, and more.

Users frequently integrate Salesforce data with:

  • other ERPs, marketing automation, HCMs, and more.
  • preferred data tools like Power BI, Tableau, Looker, and more.
  • databases and data warehouses.

For more information on how CData solutions work with Salesforce, check out our Salesforce integration page.


Getting Started


Connect to Salesforce in Tableau

Before starting Tableau, make sure you've placed the .jar file in the correct folder:

  • Windows: C:\Program Files\Tableau\Drivers
  • MacOS: ~/Library/Tableau/Drivers

Once your .jar file is in place, establishing a connection is straightforward.

  1. Start Tableau.
  2. Under To a Server, select More.
  3. Select Other Databases (JDBC)
  4. Enter the JDBC connection string in the URL field.
  5. There are several authentication methods available for connecting to Salesforce: OAuth, Login (or basic), and SSO. The Login method requires you to have the username, password, and security token of the user.

    OAuth Authentication (default)

    The default authentication mechanism (and the one preferred by Salesforce) is OAuth. To use OAuth with CData's embedded OAuth application, leave the connection properties blank. If you have configured your own custom OAuth application with Salesforce (see the Help documentation for more information), set OAuthClientId, OAuthClientSecret, and CallbackURL to the properties for you application. Set InitiateOAuth to the desired OAuth flow ("GETANDREFRESH" will have the connector manage the entire OAuth flow).

    Login (or Basic) Authentication

    If you do not wish do not wish to use OAuth authentication, you can use Login (or basic) authentication. Set AuthScheme to Basic, and set the User, Password, and SecurityToken properties. You can configure your security token in Salesforce.

    SSO (single sign-on) Authentication

    SSO (single sign-on) can be used by setting the SSOProperties, SSOLoginUrl, and SSOExchangeURL connection properties, which allow you to authenticate to an identity provider. See the "Getting Started" chapter in the Help documentation for more information.

    Multi-Factor Authentication (MFA)

    If your 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 to both OAuth and Login authentication flows.

    Built-in Connection String Designer

    For assistance in constructing the JDBC URL, use the connection string designer built into the Salesforce JDBC Driver. Either double-click the .jar file or execute the .jar file from the command-line.

    From Windows:

    java -jar 'C:\Program Files\CData[product_name]\lib\cdata.jdbc.salesforce.jar'
    

    From MacOS:

    java -jar cdata.jdbc.salesforce.jar
    

    Fill in the connection properties and copy the connection string to the clipboard.

    ๐Ÿ‘ Using the built-in connection string designer to generate a JDBC URL (Salesforce is shown.)

    When you configure the JDBC URL, you may also want to set the Max Rows connection property. This will limit the number of rows returned, which is especially helpful for improving performance when designing reports and visualizations.

    The following is a sample URL created in the designer:

    jdbc:salesforce:InitiateOAuth=GETANDREFRESH;MFACode=YourMFACode
    
  6. Select Sign in.

Discover Schemas and Query Data

  1. Select CData from the Database pull-down menu.
  2. Select CData from the Schema pull-down menu.
  3. Drag the table onto the join area. You can include multiple tables.
  4. ๐Ÿ‘ Drag the table onto the join area.
  5. Select Update Now or Automatically Update. Update Now lets you preview the first 10,000 rows of the data source (or enter the number of rows you want to see in the Rows text box). Automatically Update automatically reflects the changes in the preview area.
  6. In the Connection menu, select the Live option, so that you skip loading a copy of the data into Tableau and instead work on real-time data.
  7. Click the tab for your worksheet. Columns are listed as Dimensions and Measures, depending on the data type. The CData Driver discovers data types automatically, allowing you to leverage the powerful data processing and visualization features of Tableau.
  8. ๐Ÿ‘ Click the tab for your worksheet.
  9. Click and drag a field from the Dimensions or Measures area to Rows or Columns. Tableau creates column or row headers.
  10. Select one of the chart types from the Show Me tab. Tableau displays the chart type that you selected.
  11. ๐Ÿ‘ Select one of the chart types from the <b>Show Me</b> tab.

Using the CData JDBC Driver for Salesforce with Tableau, you can easily create robust visualizations and reports on Salesforce data. Download a free, 30-day trial and get started today.

Ready to get started?

Download a free trial of the Salesforce Driver to get started:

 Download Now

Learn more:

๐Ÿ‘ Salesforce Icon
Salesforce JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with Salesforce account data including Leads, Contacts, Opportunities, Accounts, and more!