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: 

Need to run update statement from databricks using azure sql pyodbc connection

narendra11
New Contributor

Hi All,

 

I was Trying to run the update statement in data bricks notebook using pyodbc connection. while i was doing I was getting following error. I need assistance to solve this.

Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")

 

Thanks

1 REPLY 1

Brahmareddy
Honored Contributor III

Hi Narendra,

How are you doing today? As per my understanding, It looks like your Databricks notebook can't find the ODBC Driver 17 for SQL Server. You can first check if the driver is installed by running !odbcinst -q -d in a notebook cell. If it's missing, try installing it with !sudo apt-get update and !sudo apt-get install -y msodbcsql17, then restart the cluster. Also, verify the ODBC configuration by running !cat /etc/odbcinst.ini to check if the driver is listed. If it's still not working, check your pyodbc connection string and ensure the driver name matches the installed one, like "DRIVER={ODBC Driver 17 for SQL Server}". Try these steps and see if they help! 

Regards,

Brahma

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now