Can we use "Access Connector for Azure Databricks" to access Azure SQL Server?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 08:30 AM - edited 12-28-2023 08:39 AM
Is it possible to avoid using Service Principal (and managing their secrets) via the Python MSAL library and, instead, use the "Access Connector for Azure Databricks" to access Azure SQL Server (just like we do for connecting to Azure Data Lake Storage)?
The end goal is twofold:
- use spark.read.jdbc() to retrieve data from tables
- use pyodbc to execute INSERT/UPDATE queries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 01:15 PM
You can't use databricks Access Connector or Managed Identity.
There is option to use managed Identity but I don't believe it is very secure.
In managed resource group you can find Managed Identity ( one per workspace) that is being attached to Clusters ( VM) , you can try to grant access for this identity to your DB and get token in code , then pass it to spark read jdbc.
I have heard that with Unity federation both Oauth + data write will be possible infuture but not who knows when it will happpen 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 03:56 AM
Unfortunately, I guess the answer is no (as for today, see @Wojciech_BUK reply).