07-02-2024 05:06 AM
I previously used the following script to install and configure the ODBC driver on our shared cluster in Databricks, and it was functioning correctly. However, I am currently experiencing issues where the installation is not working as expected. Please let us know if anyone has solution.
#!/bin/bash
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get -q -y install msodbcsql17
sudo apt-get -y install unixodbc-dev
07-02-2024 05:19 AM
Could you share the error message with us?
07-02-2024 05:21 AM
@Poovarasan I need more info here. Why it's not working? What kind of error message is it showing? What are you environment details (DBR, access mode etc.)?
07-02-2024 05:25 AM
Hi @Witold & @daniel_sahal
Utilized Databricks Runtime (DBR): 14.3 LTS, which includes Apache Spark 3.5.0 and Scala 2.12. and please see below attached screenshot for more details.
DBR : 14.3 LTS (includes Apache Spark 3.5.0, Scala 2.12)
07-02-2024 05:38 AM
I honestly doubt that it worked previously, as this isn't supported on shared cluster: Check this and this for further information. I hope it helps!
07-03-2024 12:17 AM
Hi @Witold ,
I attempted to use a cluster-scoped init script, but it resulted in the following error:
INVALID_PARAMETER_VALUE: Attempting to install the following init scripts that are not in the allowlist. /Volumes/odbc/init_install_sqlserver_odbc (1).sh: PERMISSION_DENIED: '/Volumes/odbc/init_install_sqlserver_odbc (1).sh' is not in the artifact allowlist.
07-03-2024 12:27 AM
is not in the artifact allowlist
Did you follow these docs?
07-17-2024 10:05 AM
The below approach is working for me... I had to download the packages upfront and place it on a volume though.
#!/bin/bash
set -euxo pipefail
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
sudo ACCEPT_EULA=Y dpkg -i odbcinst_2.3.9-5_amd64.deb
sudo ACCEPT_EULA=Y dpkg -i msodbcsql17_17.10.1.1-1_amd64.deb
sudo ACCEPT_EULA=Y dpkg -i libsasl2-modules-gssapi-mit_2.1.27+dfsg2-3ubuntu1.2_amd64.deb
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