Configure Salesforce for ingestion

Preview

LakeFlow Connect is in gated Public Preview. To participate in the preview, contact your Databricks account team.

This article describes how to configure Salesforce for ingestion. This is a prerequisite for ingesting data from Salesforce and loading it into Databricks using LakeFlow Connect.

Salesforce setup

In this step, you’ll create a new connected app and retrieve your authorization information.

If you already have a connected app in your Salesforce account, you can use that. However, be sure to validate that it’s configured per the requirements in the next section.

Create and configure a connected app in Salesforce

  1. In the left-hand pane, click Apps > App Manager > New Connected App.

    Create a connected app in Salesforce
  2. On the New Connected App page, do the following:

    1. For Basic Information, fill in the fields Connected App Name, API Name, and Contact Email.

    2. Under API (Enable OAuth Settings), click Enable OAuth Settings.

    3. In the Callback URL field, enter https://<databricks-workspace-url>/login/oauth/salesforce.html.

      For example, https://myorganization.cloud.databricks.com/login/oauth/salesforce.html

  3. In the Selected OAuth Scopes field, add the following scopes:

    • Manage user data via APIs (api)

    • Perform requests at any time (refresh_token, offline_access)

  4. Confirm that Require Proof Key for Code Exchange (PKCE) is selected.

  5. Confirm that Require Secret for Web Server Flow and Require Secret for Refresh Token Flow are selected.

  6. Click Save.

  7. On the review page, click Manage.

    Manage connected apps in Salesforce
  8. On the app page, click Edit Policies.

    Edit policies button
    1. For OAuth Policies, set Permitted Users to All users may self-authorize.

      Note

      If your security policy is set to Only Admin-Approved Users can authorize, contact your Salesforce admin about adding your profile to the connected app.

    2. Ensure that the refresh token does not immediately expire.

    3. Click Save.

Retrieve your credentials

  1. In the left-hand pane, click Apps > App Manager.

  2. Locate your app, click the arrow menu, and click View.

    Salesforce view connected app
  3. Click Manage Consumer Details.

  4. Verify your identity, if needed.

  5. Copy the Consumer Key and Consumer Secret. You’ll need these values for authentication.

(Optional) Create a Salesforce user for retrieving data

You can optionally create a separate Salesforce user that Databricks can use to retrieve data. Make sure that the user has API access and access to all of the objects that you plan to ingest.