โ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: S1000
The 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.so
But 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.so
Anything else I should try?
I also asked this on StackOverflow: https://stackoverflow.com/questions/71271023/cannot-connect-to-databricks-sql-endpoint-using-php-and...
โ03-04-2022 04:20 AM
@Rex Lorenzoโ the driver is not yet open source (it's definitely something we're looking at). I've chatted to the team that builds drivers, getting an Arm build out is definitely on their roadmap. Unfortunately, I can't give an exact date just yet.
โ02-28-2022 01:50 PM
The problem was that the Databricks SQL driver does not yet support ARM, which my laptop and Docker container was building for. See ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/simba/spark/lib/64/libsparkodbc_sb...
I updated my repo at https://github.com/rlorenzo/databricks_php with a working example and forced the container to build an x86 version.
Will update my repo if Databricks ever supports ARM.
Hope this helps someone in the future.
โ03-01-2022 04:34 AM
Thanks for investigating, @Rex Lorenzoโ . You are indeed correct, we do not currently have an ARM build.
โ03-01-2022 08:36 AM
@Bilal Aslamโ Any plans to offer an ARM build? Or can we get access to the source so we can build one?
โ03-03-2022 05:40 AM
Also - I think we should have this as a feature request for the same . @Rex Lorenzoโ could you please add a feature request from https://docs.databricks.com/resources/ideas.html .
Let me know if you are able to else I will get this added to our internal system
โ03-03-2022 08:28 AM
@Atanu Sarkarโ I posted the feature request here https://ideas.databricks.com/ideas/DBE-I-735
โ03-03-2022 08:30 AM
Thanks you so much @Rex Lorenzoโ !
โ03-04-2022 04:20 AM
@Rex Lorenzoโ the driver is not yet open source (it's definitely something we're looking at). I've chatted to the team that builds drivers, getting an Arm build out is definitely on their roadmap. Unfortunately, I can't give an exact date just yet.
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