<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Install ODBC driver by init script in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23794#M16498</link>
    <description>&lt;P&gt;Could you please share how you solved the problem? I'm facing the same issue&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 20:36:26 GMT</pubDate>
    <dc:creator>Shourya</dc:creator>
    <dc:date>2023-01-26T20:36:26Z</dc:date>
    <item>
      <title>Install ODBC driver by init script</title>
      <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23790#M16494</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to install ODBC driver (for pyodbc).&lt;/P&gt;&lt;P&gt;I have tried to do it using terraform, however I think it is impossible.&lt;/P&gt;&lt;P&gt;So I want to do it with Init Script in my cluster. I have the code from the internet and it works when it is on the beginning of the cluster:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;curl &lt;A href="https://packages.microsoft.com/keys/microsoft.asc" target="test_blank"&gt;https://packages.microsoft.com/keys/microsoft.asc&lt;/A&gt; | apth-key add -
curl &lt;A href="https://packages.microsoft.com/config/ubuntu/16.04/prod.list" target="test_blank"&gt;https://packages.microsoft.com/config/ubuntu/16.04/prod.list&lt;/A&gt; &amp;gt; /etc/apt/sources.list.d/mssql-release/list
apt-get update
ACCEPT_EULA=Y apt-get install msodbcsql17
apt-get -y install unixodbc-dev&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So I make a init script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;file_path = "/databricks/init_script/my_scipy.bash"
file_content = """
curl &lt;A href="https://packages.microsoft.com/keys/microsoft.asc" target="test_blank"&gt;https://packages.microsoft.com/keys/microsoft.asc&lt;/A&gt; | apth-key add -
curl &lt;A href="https://packages.microsoft.com/config/ubuntu/16.04/prod.list" target="test_blank"&gt;https://packages.microsoft.com/config/ubuntu/16.04/prod.list&lt;/A&gt; &amp;gt; /etc/apt/sources.list.d/mssql-release/list"""
apt-get update
ACCEPT_EULA=Y apt-get install msodbcsql17
apt-get -y install unixodbc-dev"""
dbutils.fs.put(file_path, file_contnet, True)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And the problem is in 5 line (apt-get update).&lt;/P&gt;&lt;P&gt;Without the line driver does not works.&lt;/P&gt;&lt;P&gt;With the line cluster cannot start running because: &lt;B&gt;Script exit status is non-zero&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know what should I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Łukasz&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 12:43:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23790#M16494</guid>
      <dc:creator>LukaszJ</dc:creator>
      <dc:date>2022-04-04T12:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Install ODBC driver by init script</title>
      <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23791#M16495</link>
      <description>&lt;P&gt;This is code that I am using for pyodbc init script + also in cluster/tasks settings I have added PyPI&lt;/P&gt;&lt;P&gt; pyodbc library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;dbutils.fs.put("/databricks/scripts/pyodbc-install.sh","""
#!/bin/bash
sudo apt-key add /dbfs/databricks/scripts/microsoft.asc
sudo cp -f /dbfs/databricks/scripts/prod.list /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17""", True)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 12:50:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23791#M16495</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-04-04T12:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Install ODBC driver by init script</title>
      <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23792#M16496</link>
      <description>&lt;P&gt;Plus I downloaded permanently Microsoft libraries as they indeed crushed the server (often that page even haven't worked)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sh
sudo curl -k &lt;A href="https://packages.microsoft.com/keys/microsoft.asc" target="test_blank"&gt;https://packages.microsoft.com/keys/microsoft.asc&lt;/A&gt; &amp;gt; /dbfs/databricks/scripts/microsoft.asc 
sudo curl -k &lt;A href="https://packages.microsoft.com/config/ubuntu/16.04/prod.list" target="test_blank"&gt;https://packages.microsoft.com/config/ubuntu/16.04/prod.list&lt;/A&gt; &amp;gt; /dbfs/databricks/scripts/prod.list&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 12:53:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23792#M16496</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-04-04T12:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Install ODBC driver by init script</title>
      <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23793#M16497</link>
      <description>&lt;P&gt;Thank you Hubert for help.&lt;/P&gt;&lt;P&gt;Your code works for me! &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Łukasz&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 13:53:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23793#M16497</guid>
      <dc:creator>LukaszJ</dc:creator>
      <dc:date>2022-04-04T13:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Install ODBC driver by init script</title>
      <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23794#M16498</link>
      <description>&lt;P&gt;Could you please share how you solved the problem? I'm facing the same issue&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 20:36:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/23794#M16498</guid>
      <dc:creator>Shourya</dc:creator>
      <dc:date>2023-01-26T20:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Install ODBC driver by init script</title>
      <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/42814#M27425</link>
      <description>&lt;P&gt;Is there a way to install via a notebook only without using dbfs init script?&lt;BR /&gt;With new DBR policy of no init script. I **bleep** need to migrate shell script solution to a notebook on my workspace.&lt;BR /&gt;any leads where can we start?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 18:27:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/42814#M27425</guid>
      <dc:creator>MayaBakh_80151</dc:creator>
      <dc:date>2023-08-29T18:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Install ODBC driver by init script</title>
      <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/42826#M27428</link>
      <description>&lt;P&gt;Actually found this article and using this to migrate my shell script to workspace.&lt;BR /&gt;&lt;A href="https://kb.databricks.com/en_US/clusters/cluster-named-init-script-migration-notebook" target="_blank"&gt;Cluster-named and cluster-scoped init script migration notebook - Databricks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 21:17:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/42826#M27428</guid>
      <dc:creator>MayaBakh_80151</dc:creator>
      <dc:date>2023-08-29T21:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Install ODBC driver by init script</title>
      <link>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/132233#M49393</link>
      <description>&lt;P&gt;Hi Hubert,&lt;/P&gt;&lt;P&gt;Good Day!&lt;/P&gt;&lt;P&gt;Iam also trying to connect to sql server from Databricks via pyodbc, where I need to add the init script in cluster configuration, However what iam doing now is, having the above mentioned code in the text file and saving with .sh extension,and uploaded the file in s3 , and using that path in the init script file addition, but however it is returning me "Script Exit Status as Non Zero", So may I what can be done?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2025 12:29:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/install-odbc-driver-by-init-script/m-p/132233#M49393</guid>
      <dc:creator>GowthamR</dc:creator>
      <dc:date>2025-09-17T12:29:20Z</dc:date>
    </item>
  </channel>
</rss>

