cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Best practices to use databrics to work with sql server data on premises

serdia
New Contributor

I want to use Databricks to analyze data that is stored on an on-premises SQL Server. What is the best way to bring this data into Databricks?

I tried to configure Lakehouse Federation so I could query on-premises data directly from Databricks. However, due to the different networks, I cannot connect. I assume I’d have to configure an Azure Virtual Network or something similar.

The same issue arises when using the JDBC connector. I cannot simply connect and create a DataFrame from my data because it is on a completely different network.

Let's say I have a simple query that joins 10 tables and outputs just 200 rows. Do I need to bring all those 10 tables to Databricks? Or should I move them to Data Lake Storage first and then to Databricks?

Thanks

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @serdia, Since you mentioned network issues, setting up an Azure Virtual Network (VNet) peering between your on-premises network and Azure could be a solution. This involves:

  • VNet peering is configured as mentioned above.
  • Firewall rules on your SQL Server allow connections from the Databricks IP range.

To handle your query that joins 10 tables and outputs 200 rows, you can either move all tables directly to Databricks using ETL tools like ADF for efficient complex queries, or first transfer the tables to Data Lake Storage (ADLS) and then load them into Databricks, which is useful if you plan to leverage ADLS for other purposes.

Given your network constraints, I recommend using Azure Data Factory to move the necessary tables to Azure Data Lake Storage and then load them into Databricks.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group