VOOZH about

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

⇱ Add Salesforce Data to Informatica Enterprise Data Catalog


Add Salesforce Data to Informatica Enterprise Data Catalog

πŸ‘ Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Use the CData JDBC Driver for Salesforce with the Informatica Enterprise Data Catalog to classify and organize data.

Informatica provides a powerful, elegant means of transporting and transforming your data. By utilizing the CData JDBC driver for Salesforce, you are gaining access to a driver based on industry-proven standards that integrates seamlessly with Informatica's Enterprise Data Catalog. This tutorial shows how to classify and organize Salesforce data across any environment.

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


Load the JDBC Driver

To load the JDBC Driver:

  1. Install the JDBC Driver on the host running Informatica. For this article, it is assumed that the driver was installed into cdata.jdbc.salesforce.SalesforceDriver.
  2. $ java -jar setup.jar
    
  3. Navigate to the JDBC install directory and create a zip file called genericJDBC.zip containing the driver and its license file.
  4. $ cd ~/cdata-jdbc-driver-for-salesforce/lib
    $ zip genericJDBC.zip cdata.jdbc.salesforce.jar cdata.jdbc.salesforce.lic
    
  5. Move the genericJDBC.zip file into the Catalog Service directory within Informatica. For this article, it is assumed that Informatica is installed into /opt/informatica. Working in this folder will probably require root permissions, so make sure to su or sudo to root before continuing.
  6. # mv genericJDBC.zip /opt/informatica/services/CatalogService/ScannerBinaries
    
  7. Edit the custom deployment configuration to unpack the zip file.
  8. # cd /opt/informatica/services/CatalogService/ScannerBinaries/CustomDeployer/
    # nano scannerDeployer.xml
    

    After unpacking the existing ExecutionContextProperty nodes, add a new ExecutionContextProperty node with this content.

    <ExecutionContextProperty
     isLocationProperty="true"
     dependencyToUnpack="genericJDBC.zip">
    <PropertyName>JDBCScanner_DriverLocation</PropertyName>
    <PropertyValue>scanner_miti/genericJDBC/Drivers</PropertyValue>
    </ExecutionContextProperty>
    
  9. Refresh the Catalog Service from the Admin console.
  10. πŸ‘ Refresh the Catalog Service from the Admin console.

Configure the JDBC Resource

To configure the JDBC resource:

  1. Open the Catalog administrator and add a new JDBC resource with the following properties:
    • Driver Class: cdata.jdbc.salesforce.SalesforceDriver
    • URL: jdbc.salesforce:InitiateOAuth=GETANDREFRESH;MFACode=YourMFACode
    • 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.

      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.

    Typical additional connection string properties follow:

    JDBC;MSTR_JDBC_JAR_FOLDER=PATH\TO\JAR\;DRIVER=cdata.jdbc.salesforce.SalesforceDriver;URL={jdbc:salesforce:InitiateOAuth=GETANDREFRESH;MFACode=YourMFACode};
    
  2. Username: user
  3. Password: password
  4. Note that the Username and Password properties are required, even if the driver you are using does not require them. In those cases, you can enter a placeholder value instead.

    πŸ‘ Add a new JDBC resource (Couchbase is shown).
  5. Configure the metadata options to perform at least one source metadata scan. This scan uses the driver to determine what tables, views, and stored procedures are available through the service.
    • Source Metadata: Enable this option.
    • Catalog: Set this to the appropriate catalog for multi-catalog data sources. Otherwise, set this to CData.
    • Schema: Set this to the appropriate schema for multi-schema data sources. Otherwise, set this to the name of the service (for example, Couchbase).
    • Case-sensitivity: Generally this option should be disabled. Enable it only for data sources which are case-sensitive.
    • Import stored procedures: Enable this if you want to import stored procedure definitions in addition to tables and views.
    πŸ‘ Configure the source metadata settings (Couchbase is shown).

    Other metadata scanners may be enabled as desired.

  6. Complete the driver configuration, optionally configuring custom attributes and a scanner schedule.
  7. Perform the metadata scan by navigating to the Monitoring tab and clicking Run. Depending upon the data source, this may takes a few minutes.

When the scan is complete, a summary of all of the metadata objects is displayed along with the status of the Metadata Load job. If any errors occur, you can open the Log Location link for the job to see the errors reported by Informatica or the driver.

πŸ‘ Perform a metadata scan (Couchbase is shown).

Validate the Discovered Metadata

Open the Catalog Service browser to view the metadata extracted from the data source. Depending upon the options you selected when configuring the metadata scanner, you may see any combination of tables, views, and stored procedures for the resource you defined.

πŸ‘ Validate the discovered metadata (Couchbase is shown).

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!