- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 07:06 PM
I am trying to connect to our Databricks SQL endpoint using PHP in a Docker container.
I setup my Docker container to download and configure the ODBC driver as specified here: https://docs.databricks.com/integrations/bi/jdbc-odbc-bi.html#install-and-configure-the-odbc-driver-...
My Docker setup is at https://github.com/rlorenzo/databricks_php
However, when it try to connect using ODBC from my PHP test script I get the error:
Warning: odbc_connect(): SQL error: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source, SQL state S1000 in SQLConnect in /test_connection.php on line 14
ODBC connect failed: S1000The connection details are correct because I was able to connect to the Databricks SQL endpoint using Datagrip. I can also verify that the ODBC library is properly installed because I can query a Microsoft SQL Server.
I must have the Databricks ODBC Connector misconfigured somehow, but I am clueless. In my view, everything matches the documentation.
I did try using the Databricks driver in my odbc.ini file:
Driver=/opt/simba/spark/lib/64/libsparkodbc_sb64.soBut I get the error Can't open lib '/opt/simba/spark/lib/64/libsparkodbc_sb64.so' : file not found
However, the file does exist:
ls /opt/simba/spark/lib/64/libsparkodbc_sb64.so
-rwxrwxrwx 1 root root 76265161 Oct 26 20:51 /opt/simba/spark/lib/64/libsparkodbc_sb64.soAnything else I should try?
I also asked this on StackOverflow: https://stackoverflow.com/questions/71271023/cannot-connect-to-databricks-sql-endpoint-using-php-and...
- Labels:
-
Databricks SQL