<?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 Does the ODBC driver for databricks support parameterized queries? in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/92566#M1606</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using the official ODBC driver for databricks downloaded from here (the latest version) and trying to have a dotnet API (C#) fetching data from databricks via the driver. I am using the general Microsoft package for ODBC connection -&amp;nbsp;System.Data.Odbc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it seems like when trying to execute a parameterized query I get the&amp;nbsp;UNBOUND_SQL_PARAMETER error which says that the values for the params has not been passed.&lt;/P&gt;&lt;P&gt;Here is a snippet of my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using OdbcCommand command = connection.CreateCommand();
command.CommandText = Sql;
command.Parameters.Add(new OdbcParameter("param1", param1));
command.Parameters.Add(new OdbcParameter("param2", param2));

using OdbcDataReader reader = command.ExecuteReader();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and in the query I have :param1 and :param2.&lt;/P&gt;&lt;P&gt;I am wondering if the ODBC driver supports passing params to queries?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 10:06:14 GMT</pubDate>
    <dc:creator>DilyanDimitrov</dc:creator>
    <dc:date>2024-10-02T10:06:14Z</dc:date>
    <item>
      <title>Does the ODBC driver for databricks support parameterized queries?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/92566#M1606</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using the official ODBC driver for databricks downloaded from here (the latest version) and trying to have a dotnet API (C#) fetching data from databricks via the driver. I am using the general Microsoft package for ODBC connection -&amp;nbsp;System.Data.Odbc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it seems like when trying to execute a parameterized query I get the&amp;nbsp;UNBOUND_SQL_PARAMETER error which says that the values for the params has not been passed.&lt;/P&gt;&lt;P&gt;Here is a snippet of my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using OdbcCommand command = connection.CreateCommand();
command.CommandText = Sql;
command.Parameters.Add(new OdbcParameter("param1", param1));
command.Parameters.Add(new OdbcParameter("param2", param2));

using OdbcDataReader reader = command.ExecuteReader();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and in the query I have :param1 and :param2.&lt;/P&gt;&lt;P&gt;I am wondering if the ODBC driver supports passing params to queries?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 10:06:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/92566#M1606</guid>
      <dc:creator>DilyanDimitrov</dc:creator>
      <dc:date>2024-10-02T10:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Does the ODBC driver for databricks support parameterized queries?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/95793#M1648</link>
      <description>&lt;P&gt;I'm getting the same error as well.&amp;nbsp; I've even tried including the Driver in the connection string (on Windows it is&amp;nbsp;Simba Spark ODBC Driver, and Linux has a similar name).&lt;/P&gt;&lt;P&gt;I've tried changing the param name :param1,&amp;nbsp;@param1, and just param1.&amp;nbsp; &amp;nbsp;They all result in the same error.&lt;/P&gt;&lt;P&gt;Unfortunately you can't read or debug the ODBC driver.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 23:56:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/95793#M1648</guid>
      <dc:creator>mjaptarro</dc:creator>
      <dc:date>2024-10-23T23:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Does the ODBC driver for databricks support parameterized queries?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/95794#M1649</link>
      <description>&lt;P&gt;I'll also point out that all of the chatGpt/copilots tell us our code is written correctly.&amp;nbsp; Even the Assist in Data Bricks gives the same answer.&amp;nbsp; I've read the docs and am unable to figure out an alternate way.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 23:58:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/95794#M1649</guid>
      <dc:creator>mjaptarro</dc:creator>
      <dc:date>2024-10-23T23:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Does the ODBC driver for databricks support parameterized queries?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/96788#M1663</link>
      <description>&lt;P&gt;Instead of named parameters, the ODBC .NET Provider uses positional parameters that are marked with a question mark (?) in the syntax of the command text.&lt;BR /&gt;&lt;BR /&gt;Please make sure that UseNativeQuery to false(0) in the odbc connection string as they have mentioned in the&amp;nbsp;&lt;A href="https://docs.databricks.com/en/_extras/documents/Simba-Apache-Spark-ODBC-Connector-Install-and-Configuration-Guide.pdf" target="_blank"&gt;https://docs.databricks.com/en/_extras/documents/Simba-Apache-Spark-ODBC-Connector-Install-and-Configuration-Guide.pdf&lt;/A&gt;&amp;nbsp;. that when this option is enabled(1) the parameterized query won't work.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parameter.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12384iE06328F0CAFC2B3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="parameter.png" alt="parameter.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 11:34:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/does-the-odbc-driver-for-databricks-support-parameterized/m-p/96788#M1663</guid>
      <dc:creator>_Sumit_Kate</dc:creator>
      <dc:date>2024-10-30T11:34:00Z</dc:date>
    </item>
  </channel>
</rss>

