3 weeks ago
Hey Databricks!
Trying to use the pyodbc init script in a Volume in UC on a shared compute cluster but receive error: "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)"). I followed the instructions here which seem straightforward: Shared Clusters in Unity Catalog | Databricks Blog
1) pyodbc-install.sh is uploaded in a Volume 2) the shared cluster is able to navigate to the Volume to select the init script 3) the Databricks runtime is 13.3 LTS 4) the Allowlist has been updated to allow the init script 5) the cluster spins up with no problem 6) the pyodbc==5.2.0 library has been installed (although it made no difference) but 7) it errors with "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")
Seems like it can't read or find the pyodbc file so doesn't find any drivers. Although the cluster can navigate to it.
Is it a permissions issue? What am I doing wrong?
Thanks!
Benedetta
2 weeks ago
Hi @Benni ,
Ensure that the ODBC Driver 17 for SQL Server is installed on the Databricks cluster, you can verify this by running the following command in a notebook cell on the cluster to check if the driver is available in the system:
!ls /opt/microsoft/msodbcsql17/lib64/
if the msodbcsql17 library is missing, it indicates the driver was not installed properly.
Let me know if you need further assistance!
2 weeks ago
Hi @agallard
Thanks for you reply - but it's not installed on the cluster.....because it seems like it's not reading the pyodbc init script (which also has the msodbcsql17 driver in it) in the Volume in the Unity Catalog. Why can't it read the file from the Volume?. If I install the init script globally, and use a single use cluster that works. I'm trying to make a shared cluster that can connect to Azure SQL Database (among other things), and the instructions say to place the init script in a Volume when it's Unity Catalog.
Thanks!
Benedetta
2 weeks ago
Hey Databricks - can you help me understand why the init script in the Volume doesn't work for a shared cluster?
Thanks!
Benedetta
2 weeks ago
May you should have a look here for global init script:
https://learn.microsoft.com/en-us/azure/databricks/init-scripts/
2 weeks ago
Hi h_h_ak,
Sure, sure. I've already done that. We can't use global init scripts with Shared Clusters and UC. Seems it has to be installed in Volume or cloud storage. How come mu shared cluster can't read the pyodbc script in the volume?
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