redash icon indicating copy to clipboard operation
redash copied to clipboard

Can't connect to MS SQL data source

Open gdaitis opened this issue 1 year ago • 5 comments

Discussed in https://github.com/getredash/redash/discussions/5948

Originally posted by gdaitis March 29, 2023 Hey guys! I'm trying to connect to a MS SQL data source, and I'm getting this weird error: Screenshot 2023-03-29 at 14 50 55 What am I doing wrong?

gdaitis avatar Mar 29 '23 11:03 gdaitis

What version of Redash are you using?

lucasfcnunes avatar Apr 01 '23 01:04 lucasfcnunes

Ahhh. This one I've seen before. It seems to be some kind of bug in the part of the Dockerfile which pulls in the MS SQL ODBC driver:

https://github.com/getredash/redash/blob/ad7d30f91de64a291eb89892c713bd0067c47ecc/Dockerfile#L66-L81

The second half of that code, where it installs "Simba ODBC" somehow kills the MS SQL driver files.

So, if you delete line 73-81, then remove the trailing / left over on line 72... the Dockerfile should then build ok and the SQL Server connection will work:

https://github.com/getredash/redash/blob/ad7d30f91de64a291eb89892c713bd0067c47ecc/Dockerfile#L73-L81

Discovered the same thing recently, and did effectively that (but a bit messier) to solve it. Haven't followed that up to make a "proper" solution/patch though. :innocent:

justinclift avatar Apr 11 '23 12:04 justinclift

@arikfr This bug might interest you, as you've been doing stuff on that section of the Dockerfile recently. :smile:

justinclift avatar Apr 11 '23 12:04 justinclift

Thanks for the tag, @justinclift. I think what happens here is that the Simba driver fails to install because it’s not compatible with ARM.

Either way Databricks has a native Python driver now and I plan to switch to it to avoid the need for Simba.

arikfr avatar Apr 16 '23 14:04 arikfr

@arikfr Is this the Databricks python package you're meaning?

https://pypi.org/project/databricks-sdk/

justinclift avatar Oct 07 '23 20:10 justinclift