<?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: Assistance Required: Integrating Databricks ODBC Connector with Azure App Service in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/assistance-required-integrating-databricks-odbc-connector-with/m-p/103667#M2630</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/139450"&gt;@nanda_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;So basically what you need to do is to install simba odbc driver on your Azure App Service environment. Then your code should work in the same way as in your local machine.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One possibility is to use Windows or Linux Containers on Azure App Service in which you have control over what drivers or custom software to install.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In&amp;nbsp; Dockerfile you can installl databricks ODBC driver in following way (adjust driver version to your needs) :&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Install Databricks ODBC driver.  
RUN apt update &amp;amp;&amp;amp; apt install -y unixodbc unixodbc-dev freetds-dev sqsh tdsodbc unzip libsasl2-modules-gssapi-mit  
RUN curl -sL https://databricks.com/wp-content/uploads/drivers-2020/SimbaSparkODBC-2.6.16.1019-Debian-64bit.zip -o databricksOdbc.zip &amp;amp;&amp;amp; unzip databricksOdbc.zip  
RUN dpkg -i SimbaSparkODBC-2.6.16.1019-Debian-64bit/simbaspark_2.6.16.1019-2_amd64.deb  
RUN export ODBCINI=/etc/odbc.ini ODBCSYSINI=/etc/odbcinst.ini SIMBASPARKINI=/opt/simba/spark/lib/64/simba.sparkodbc.ini&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;If you're using the source code deployment option, then you can try to install Simba ODBC driver using SSH.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Dec 2024 12:36:31 GMT</pubDate>
    <dc:creator>szymon_dybczak</dc:creator>
    <dc:date>2024-12-31T12:36:31Z</dc:date>
    <item>
      <title>Assistance Required: Integrating Databricks ODBC Connector with Azure App Service</title>
      <link>https://community.databricks.com/t5/administration-architecture/assistance-required-integrating-databricks-odbc-connector-with/m-p/103661#M2628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have successfully established an ODBC connection with Databricks to retrieve data from the Unity Catalog in a local C# application using the Simba Spark ODBC Driver, and it is working as expected.&lt;/P&gt;&lt;P&gt;I now need to integrate this functionality into an existing .NET C# application hosted on an Azure App Service (Linux). However, I have not been able to locate any documentation or resources specific to implementing the ODBC connector in this environment.&lt;/P&gt;&lt;P&gt;Could you kindly provide any relevant documentation, guidelines, or suggestions on how to achieve this integration? Your assistance would be greatly appreciated.&lt;/P&gt;&lt;P&gt;using System;&lt;BR /&gt;using System.Data.Odbc;&lt;/P&gt;&lt;P&gt;class Program&lt;BR /&gt;{&lt;BR /&gt;static void Main()&lt;BR /&gt;{&lt;BR /&gt;// Connection details&lt;/P&gt;&lt;P&gt;// ODBC connection string&lt;BR /&gt;//string connectionString = $"Driver={{Simba Spark ODBC Driver}};" +&lt;BR /&gt;// $"Host={serverHostname};" +&lt;BR /&gt;// $"HTTPPath={httpPath};" +&lt;BR /&gt;// $"AuthMech=3;" +&lt;BR /&gt;// $"UID=token;" +&lt;BR /&gt;// $"PWD={accessToken};";&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;// Connect to the database&lt;BR /&gt;using (OdbcConnection connection = new OdbcConnection(connectionString))&lt;BR /&gt;{&lt;BR /&gt;connection.Open();&lt;BR /&gt;Console.WriteLine("Connected to Databricks!");&lt;/P&gt;&lt;P&gt;// Query to execute&lt;BR /&gt;string query = "SELECT * FROM Table LIMIT 5";&lt;/P&gt;&lt;P&gt;using (OdbcCommand command = new OdbcCommand(query, connection))&lt;BR /&gt;{&lt;BR /&gt;using (OdbcDataReader reader = command.ExecuteReader())&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Query Results:");&lt;BR /&gt;while (reader.Read())&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(reader["column"]);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Error: " + ex.Message);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 12:17:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/assistance-required-integrating-databricks-odbc-connector-with/m-p/103661#M2628</guid>
      <dc:creator>nanda_</dc:creator>
      <dc:date>2024-12-31T12:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required: Integrating Databricks ODBC Connector with Azure App Service</title>
      <link>https://community.databricks.com/t5/administration-architecture/assistance-required-integrating-databricks-odbc-connector-with/m-p/103664#M2629</link>
      <description>&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;To integrate the Simba Spark ODBC Driver into your existing .NET C# application hosted on an Azure App Service (Linux), you can follow these steps:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Install the ODBC Driver on Azure App Service (Linux):&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL class="_1t7bu9h7 _1t7bu9h2"&gt;
&lt;LI&gt;&lt;SPAN&gt;Download the Simba Spark ODBC Driver for Linux from the Databricks website.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Use the RPM or tarball package to install the driver on your Azure App Service. For example, if using the tarball package, you can extract it to the `/opt` directory:&lt;/SPAN&gt;
&lt;DIV class="gb5fhw2"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-bash _1t7bu9hb hljs language-bash gb5fhw3"&gt;tar --directory=/opt -zxvf SimbaSparkODBC-[Version].[Release]-Linux.tar.gz&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Configure the ODBC Driver:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL class="_1t7bu9h7 _1t7bu9h2"&gt;
&lt;LI&gt;&lt;SPAN&gt;Set up the &lt;CODE&gt;odbc.ini&lt;/CODE&gt; and &lt;CODE&gt;odbcinst.ini&lt;/CODE&gt; configuration files. These files should be placed in a directory accessible by the application, such as &lt;CODE&gt;/etc&lt;/CODE&gt;.&lt;/SPAN&gt;
&lt;DIV class="_1sijkvt3"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Example `odbcinst.ini` configuration:&lt;/SPAN&gt;
&lt;DIV class="_1sijkvt3"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="gb5fhw2"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-ini _1t7bu9hb hljs language-ruby gb5fhw3"&gt;[&lt;SPAN class="hljs-variable constant_"&gt;ODBC&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Drivers&lt;/SPAN&gt;]
&lt;SPAN class="hljs-title class_"&gt;Simba&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Apache&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Spark&lt;/SPAN&gt; &lt;SPAN class="hljs-variable constant_"&gt;ODBC&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Connector&lt;/SPAN&gt;=&lt;SPAN class="hljs-title class_"&gt;Installed&lt;/SPAN&gt;

[&lt;SPAN class="hljs-title class_"&gt;Simba&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Apache&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Spark&lt;/SPAN&gt; &lt;SPAN class="hljs-variable constant_"&gt;ODBC&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Connector&lt;/SPAN&gt;]
&lt;SPAN class="hljs-title class_"&gt;Description&lt;/SPAN&gt;=&lt;SPAN class="hljs-title class_"&gt;Simba&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Apache&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Spark&lt;/SPAN&gt; &lt;SPAN class="hljs-variable constant_"&gt;ODBC&lt;/SPAN&gt; &lt;SPAN class="hljs-title class_"&gt;Connector&lt;/SPAN&gt;
&lt;SPAN class="hljs-title class_"&gt;Driver&lt;/SPAN&gt;=&lt;SPAN class="hljs-regexp"&gt;/opt/simba&lt;/SPAN&gt;&lt;SPAN class="hljs-regexp"&gt;/spark/lib&lt;/SPAN&gt;&lt;SPAN class="hljs-regexp"&gt;/64/libsparkodbc&lt;/SPAN&gt;_sb64.so&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="gb5fhw4"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;Example &lt;CODE&gt;odbc.ini&lt;/CODE&gt; configuration:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="gb5fhw2"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-ini _1t7bu9hb hljs language-makefile gb5fhw3"&gt;[ODBC Data Sources]
Sample DSN=Simba Apache Spark ODBC Connector

[Sample DSN]
Driver=/opt/simba/spark/lib/64/libsparkodbc_sb64.so
Host=your-databricks-host
Port=443
AuthMech=3
UID=token
PWD=your-access-token&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Set Environment Variables:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL class="_1t7bu9h7 _1t7bu9h2"&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;SPAN&gt;Ensure the environment variables are set to point to the ODBC configuration files. Add the following to your startup script or environment configuration:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="gb5fhw2"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-bash _1t7bu9hb hljs language-bash gb5fhw3"&gt;&lt;SPAN class="hljs-built_in"&gt;export&lt;/SPAN&gt; ODBCINI=/etc/odbc.ini
&lt;SPAN class="hljs-built_in"&gt;export&lt;/SPAN&gt; ODBCINSTINI=/etc/odbcinst.ini
&lt;SPAN class="hljs-built_in"&gt;export&lt;/SPAN&gt; LD_LIBRARY_PATH=&lt;SPAN class="hljs-variable"&gt;$LD_LIBRARY_PATH&lt;/SPAN&gt;:/opt/simba/spark/lib/64&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;&lt;STRONG&gt;Modify Your C# Application:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL class="_1t7bu9h7 _1t7bu9h2"&gt;
&lt;LI&gt;Update your connection string in the C# application to use the DSN configured in the &lt;CODE&gt;odbc.ini&lt;/CODE&gt; file:&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="_1sijkvt3"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="gb5fhw2"&gt;
&lt;PRE&gt;&lt;CODE class="markdown-code-csharp _1t7bu9hb hljs language-csharp gb5fhw3"&gt;  &lt;SPAN class="hljs-built_in"&gt;string&lt;/SPAN&gt; connectionString = &lt;SPAN class="hljs-string"&gt;"DSN=Sample DSN;"&lt;/SPAN&gt;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 31 Dec 2024 12:32:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/assistance-required-integrating-databricks-odbc-connector-with/m-p/103664#M2629</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-31T12:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required: Integrating Databricks ODBC Connector with Azure App Service</title>
      <link>https://community.databricks.com/t5/administration-architecture/assistance-required-integrating-databricks-odbc-connector-with/m-p/103667#M2630</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/139450"&gt;@nanda_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;So basically what you need to do is to install simba odbc driver on your Azure App Service environment. Then your code should work in the same way as in your local machine.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;One possibility is to use Windows or Linux Containers on Azure App Service in which you have control over what drivers or custom software to install.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In&amp;nbsp; Dockerfile you can installl databricks ODBC driver in following way (adjust driver version to your needs) :&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Install Databricks ODBC driver.  
RUN apt update &amp;amp;&amp;amp; apt install -y unixodbc unixodbc-dev freetds-dev sqsh tdsodbc unzip libsasl2-modules-gssapi-mit  
RUN curl -sL https://databricks.com/wp-content/uploads/drivers-2020/SimbaSparkODBC-2.6.16.1019-Debian-64bit.zip -o databricksOdbc.zip &amp;amp;&amp;amp; unzip databricksOdbc.zip  
RUN dpkg -i SimbaSparkODBC-2.6.16.1019-Debian-64bit/simbaspark_2.6.16.1019-2_amd64.deb  
RUN export ODBCINI=/etc/odbc.ini ODBCSYSINI=/etc/odbcinst.ini SIMBASPARKINI=/opt/simba/spark/lib/64/simba.sparkodbc.ini&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;If you're using the source code deployment option, then you can try to install Simba ODBC driver using SSH.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 12:36:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/assistance-required-integrating-databricks-odbc-connector-with/m-p/103667#M2630</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-12-31T12:36:31Z</dc:date>
    </item>
  </channel>
</rss>

