VOOZH about

URL: https://www.cdata.com/kb/tech/salesforcedc-ssis-databricks.rst

⇱ Migrating data from Salesforce Data Cloud to Databricks using CData SSIS Components.


Migrating data from Salesforce Data Cloud to Databricks using CData SSIS Components.

πŸ‘ Cameron Leblanc
Cameron Leblanc
Senior Technology Evangelist
Easily push Salesforce Data Cloud data to Databricks using the CData SSIS Tasks for Salesforce Data Cloud and Databricks.

Databricks is a unified data analytics platform that allows organizations to easily process, analyze, and visualize large amounts of data. It combines data engineering, data science, and machine learning capabilities in a single platform, making it easier for teams to collaborate and derive insights from their data.

The CData SSIS Components enhance SQL Server Integration Services by enabling users to easily import and export data from various sources and destinations.

In this article, we explore the data type mapping considerations when exporting to Databricks and walk through how to migrate Salesforce Data Cloud data to Databricks using the CData SSIS Components for Salesforce Data Cloud and Databricks.

Data Type Mapping

Databricks Schema CData Schema

int, integer, int32

int

smallint, short, int16

smallint

double, float, real

float

date

date

datetime, timestamp

datetime

time, timespan

time

string, varchar

If length > 4000: nvarchar(max), Otherwise: nvarchar(length)

long, int64, bigint

bigint

boolean, bool

tinyint

decimal, numeric

decimal

uuid

nvarchar(length)

binary, varbinary, longvarbinary

binary(1000) or varbinary(max) after SQL Server 2000


Special Considerations

  • String/VARCHAR: String columns from Databricks can map to different data types depending on the length of the column. If the column length exceeds 4000, then the column is mapped to nvarchar (max). Otherwise, the column is mapped to nvarchar (length).
  • DECIMAL Databricks supports DECIMAL types up to 38 digits of precision, but any source column beyond that can cause load errors.

Prerequisites

Create the project and add components

  1. Open Visual Studio and create a new Integration Services Project. πŸ‘ Create the SSIS project
  2. Add a new Data Flow Task to the Control Flow screen and open the Data Flow Task.
  3. Add a CData Salesforce Data Cloud Source control and a CData Databricks Destination control to the data flow task. πŸ‘ Add the source and destination controls (Salesforce is shown)

Configure the Salesforce Data Cloud source

Follow the steps below to specify properties required to connect to Salesforce Data Cloud.

  1. Double-click the CData Salesforce Data Cloud Source to open the source component editor and add a new connection. πŸ‘ Open the source component editor (Salesforce is shown)
  2. In the CData Salesforce Data Cloud Connection Manager, configure the connection properties, then test and save the connection.

    Salesforce Data Cloud supports authentication via the OAuth standard.

    OAuth

    Set to OAuth.

    Desktop Applications

    CData provides an embedded OAuth application that simplifies authentication at the desktop.

    You can also authenticate from the desktop via a custom OAuth application, which you configure and register at the Salesforce Data Cloud console. For further information, see Creating a Custom OAuth App in the Help documentation.

    Before you connect, set these properties:

    • : GETANDREFRESH. You can use to avoid repeating the OAuth exchange and manually setting the .
    • (custom applications only): The Client ID assigned when you registered your custom OAuth application.
    • (custom applications only): The Client Secret assigned when you registered your custom OAuth application.

    When you connect, the driver opens Salesforce Data Cloud's OAuth endpoint in your default browser. Log in and grant permissions to the application.

    The driver then completes the OAuth process as follows:

Configure the Databricks destination

With the Salesforce Data Cloud Source configured, we can configure the Databricks connection and map the columns.

  1. Double-click the CData Databricks Destination to open the destination component editor and add a new connection. πŸ‘ Open the destination component editor
  2. In the CData Databricks Connection Manager, configure the connection properties, then test and save the connection. To connect to a Databricks cluster, set the properties as described below.

    Note: The needed values can be found in your Databricks instance by navigating to Clusters, selecting the desired cluster, and selecting the JDBC/ODBC tab under Advanced Options.

    • Server: Set to the Server Hostname of your Databricks cluster.
    • HTTPPath: Set to the HTTP Path of your Databricks cluster.
    • Token: Set to your personal access token (this value can be obtained by navigating to the User Settings page of your Databricks instance and selecting the Access Tokens tab).

    Other helpful connection properties

    • QueryPassthrough: When this is set to True, queries are passed through directly to Databricks.
    • ConvertDateTimetoGMT: When this is set to True, the components will convert date-time values to GMT, instead of the local time of the machine.
    • UseUploadApi: Setting this property to true will improve performance if there is a large amount of data in a Bulk INSERT operation.
    • UseCloudFetch: This option specifies whether to use CloudFetch to improve query efficiency when the table contains over one million entries.
    πŸ‘ Configure the destination connection
  3. After saving the connection, select a table in the Use a Table menu and in the Action menu, select Insert. πŸ‘ Choose the destination table
  4. On the Column Mappings tab, configure the mappings from the input columns to the destination columns. πŸ‘ Map the columns (Salesforce is shown)

Run the project

You can now run the project. After the SSIS Task has finished executing, data from your SQL table will be exported to the chosen table.

Ready to get started?

Download a free trial of the Salesforce Data Cloud SSIS Component to get started:

 Download Now

Learn more:

πŸ‘ Salesforce Data Cloud Icon
Salesforce Data Cloud SSIS Components

Powerful SSIS Source & Destination Components that allows you to easily connect SQL Server with Salesforce Data Cloud through SSIS Workflows.

Use the Salesforce Data Cloud Data Flow Components to synchronize with Salesforce Data Cloud 0, and more. Perfect for data synchronization, local back-ups, workflow automation, and more!