Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Wu-Dongxue
Product and Topic Expert
Product and Topic Expert
2,479

Introduction

Welcome to our comprehensive guide on setting up a JDBC connection between SAP Analytics Cloud (SAC) and Databricks. Whether you are using the SAP Analytics Cloud Agent Simple Deployment Kit or opting for a manual setup, this tutorial will walk you through each step to ensure a smooth and successful integration. By following these detailed instructions, you'll be able to download and install the necessary JDBC drivers, create and configure the required property files, and establish a secure connection to your Databricks SQL warehouses. Let's dive in and get started on enhancing your data analytics capabilities with SAC and Databricks.

Prerequisite

Performed setup using the SAP Analytics Cloud Agent Simple Deployment Kit or

Performed a manual setup by following the steps 1,2,4,5 in Prerequisites

1. Download and Install JDBC Driver

a. Download the latest JDBC drive from databricks.com All JDBC Driver Versions

WuDongxue_0-1721229374117.png

b. Extract the zip file and then place the downloaded jar file(s) in an appropriate folder. The jar files can be in any location on your machine as long as the properties file includes the correct file locations. For example, 

WuDongxue_1-1721228292834.png

2. Create a Property File

a. Create a properties file that specifies the paths to JDBC drivers you want to use, and place it in the same file system where the SAP Analytics Cloud agent is installed. The properties file can have any name, such as DriverConfig.properties. See Example of a properties file

b. Open the file as an administrator and update line from 

#Generic JDBC datasource="path_to_JDBCdriver"

to 

Generic JDBC datasource=C:\Program Files\SAP\SACAgentKit\drivers\DatabricksJDBC42-2.6.36.1062\DatabricksJDBC42.jar

Note: C:\Program Files\SAP\SACAgentKit\drivers\DatabricksJDBC42-2.6.36.1062\DatabricksJDBC42.jar is the path I placed the jar file in the Blog. You have to change it to the real path where you place the jar file in your system

c. Save the property file 

d. Restart Tomcat

3. Find Connection Information in DataBricks

a. JDBC URL

Login DataBricks on AWS > Click SQL Warehouses from the navigational menu> Select SQL warehouses tab > Select a target SQL warehouse name

WuDongxue_2-1721228908394.png

Click on Connection details tab within the target warehouse > Copy all strings from the JDBC URL box

WuDongxue_1-1721229546694.png

b. Based on the DataBricks official document, “by default, the connector uses the schema named default and authenticates the connection using the user name token

WuDongxue_2-1721229589888.png

c. Based on the DataBricks official document, JDBC Class name is com.databricks.client.jdbc.Driver

WuDongxue_3-1721229589895.png

d. Find password.

Click on the user profile > select User Settings

WuDongxue_4-1721229654666.png

Select Developer tab from the Settings area > Click on Manage button in the Access tokens section

WuDongxue_5-1721229654673.png

Click on Generate new token button

WuDongxue_6-1721229654675.png

Input a meaningful name > set Lifetime days for the token (maximum 10 years) > Click on  Generate > Copy the token string > Store in the secured area (You won’t have chance to check the token value again once you close the prompt window)

WuDongxue_7-1721229654676.png

4. Build Connection in SAC

a. Go to Connection are in SAC -> Create New Connection -> Search for SQL Database

WuDongxue_8-1721229807269.png

b. Select correct LocationID and Generic JDBC datasource

WuDongxue_9-1721229807271.png

Give a meaningful name for the connection (the name can be update later) > Enter JDBC URL > Enter JDBC Class > Enter User Name = token > Enter Password = Access token > (Optional) Select Share credentials when sharing this connection > Click on Create button

WuDongxue_10-1721229807279.png


Note: If you want to share the credential details, select the option Share these credentials when sharing this connection. Otherwise, users will need to enter their own credentials in order to use the connection. If you don't share your credentials, users will be able to edit their credentials at any time without having to start a data acquisition process.

5. Test Connection

WuDongxue_11-1721229907301.png

Conclusion

Congratulations on completing the setup of your JDBC connection between SAP Analytics Cloud and Databricks. By following this guide, you have successfully configured your SAC connection to Databricks. With this integration, you can now leverage the powerful analytics and data visualization capabilities of SAC using data stored in Databricks. We hope this guide has been helpful and has made the setup process straightforward and efficient. If you have any questions or need further assistance, feel free to reach out.

 

 

3 Comments
sachin_ail
Explorer
0 Kudos

Hello,

Is this functionality still available?  Can we import data from Databricks to SAC using JDBC connection?

 

Regards,
Sachin

Wu-Dongxue
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello @sachin_ail , yes, it is still available. 

sachin_ail
Explorer
0 Kudos

Thanks for confirming @Wu-Dongxue.

 

Kind regards,
Sachin