<?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 [UNBOUND_SQL_PARAMETER] error in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/unbound-sql-parameter-error/m-p/98124#M1679</link>
    <description>&lt;P&gt;Hi, I'd appreciate it if anyone could help!&lt;/P&gt;&lt;P&gt;We are using offical ODBC driver (Simba Spark ODBC Driver 64-bit 2.08.02.1013) in our application. C++ APIs.&lt;/P&gt;&lt;P&gt;All the following SQL statements are passed through ODBC API to Databricks:&lt;/P&gt;&lt;P&gt;successully executing: &lt;STRONG&gt;CREATE TABLE hive_metastore.default.a_dbTab1( id DOUBLE, name STRING )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We wanted to do this:&amp;nbsp; &lt;STRONG&gt;insert into hive_metastore.default.a_dbTab1(id, name) values(1, "Alice");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1. execute prepare statement successfully:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;INSERT INTO hive_metastore.default.a_dbTab1(`id` , `name` ) VALUES (?,?)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. Bind the insert statement also run successfully.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. But when we ran the execute the insert statement, got this error:&lt;/P&gt;&lt;P&gt;42P02: [Simba][Hardy] (80) Syntax or semantic analysis error thrown in server while&lt;BR /&gt;executing query. Error message from server: org.apache.hive.service.cli.HiveSQLException:&lt;BR /&gt;Error running query: [UNBOUND_SQL_PARAMETER]&lt;BR /&gt;org.apache.spark.sql.catalyst.ExtendedAnalysisException: [UNBOUND_SQL_PARAMETER] Found&lt;BR /&gt;the unbound parameter: _68. Please, fix `args` and provide a mapping of the parameter to&lt;BR /&gt;either a SQL literal or collection constructor functions such as `map()`, `array()`,&lt;BR /&gt;`struct()`. SQLSTATE: 42P02; line 1 pos 68&lt;BR /&gt;at&lt;BR /&gt;org.apache.spark.sql.hive.thriftserver.HiveThriftServerErrors$.runningQueryError(HiveThri&lt;BR /&gt;ftServerErrors.scala:49)&lt;BR /&gt;at&lt;BR /&gt;org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.$anonfun$execute$1(&lt;BR /&gt;SparkExecuteStatementOperation.scala:805)&lt;BR /&gt;at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)&lt;BR /&gt;at com.databricks.unity.UCSEphemeralState$Handle.runWith(UCSEphemeralState.scala:51)&lt;BR /&gt;at com.databricks.unity.HandleImpl.runWith(UCSHandle.scala:104)&lt;BR /&gt;at org.apache.spark.sql.hiv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2024 18:02:06 GMT</pubDate>
    <dc:creator>AnnaP</dc:creator>
    <dc:date>2024-11-07T18:02:06Z</dc:date>
    <item>
      <title>[UNBOUND_SQL_PARAMETER] error</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/unbound-sql-parameter-error/m-p/98124#M1679</link>
      <description>&lt;P&gt;Hi, I'd appreciate it if anyone could help!&lt;/P&gt;&lt;P&gt;We are using offical ODBC driver (Simba Spark ODBC Driver 64-bit 2.08.02.1013) in our application. C++ APIs.&lt;/P&gt;&lt;P&gt;All the following SQL statements are passed through ODBC API to Databricks:&lt;/P&gt;&lt;P&gt;successully executing: &lt;STRONG&gt;CREATE TABLE hive_metastore.default.a_dbTab1( id DOUBLE, name STRING )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We wanted to do this:&amp;nbsp; &lt;STRONG&gt;insert into hive_metastore.default.a_dbTab1(id, name) values(1, "Alice");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1. execute prepare statement successfully:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;INSERT INTO hive_metastore.default.a_dbTab1(`id` , `name` ) VALUES (?,?)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. Bind the insert statement also run successfully.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. But when we ran the execute the insert statement, got this error:&lt;/P&gt;&lt;P&gt;42P02: [Simba][Hardy] (80) Syntax or semantic analysis error thrown in server while&lt;BR /&gt;executing query. Error message from server: org.apache.hive.service.cli.HiveSQLException:&lt;BR /&gt;Error running query: [UNBOUND_SQL_PARAMETER]&lt;BR /&gt;org.apache.spark.sql.catalyst.ExtendedAnalysisException: [UNBOUND_SQL_PARAMETER] Found&lt;BR /&gt;the unbound parameter: _68. Please, fix `args` and provide a mapping of the parameter to&lt;BR /&gt;either a SQL literal or collection constructor functions such as `map()`, `array()`,&lt;BR /&gt;`struct()`. SQLSTATE: 42P02; line 1 pos 68&lt;BR /&gt;at&lt;BR /&gt;org.apache.spark.sql.hive.thriftserver.HiveThriftServerErrors$.runningQueryError(HiveThri&lt;BR /&gt;ftServerErrors.scala:49)&lt;BR /&gt;at&lt;BR /&gt;org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.$anonfun$execute$1(&lt;BR /&gt;SparkExecuteStatementOperation.scala:805)&lt;BR /&gt;at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)&lt;BR /&gt;at com.databricks.unity.UCSEphemeralState$Handle.runWith(UCSEphemeralState.scala:51)&lt;BR /&gt;at com.databricks.unity.HandleImpl.runWith(UCSHandle.scala:104)&lt;BR /&gt;at org.apache.spark.sql.hiv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 18:02:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/unbound-sql-parameter-error/m-p/98124#M1679</guid>
      <dc:creator>AnnaP</dc:creator>
      <dc:date>2024-11-07T18:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: [UNBOUND_SQL_PARAMETER] error</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/unbound-sql-parameter-error/m-p/101278#M1740</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/131517"&gt;@AnnaP&lt;/a&gt;&amp;nbsp;Hey,&lt;BR /&gt;Did you try below:&lt;/P&gt;&lt;P&gt;To disable the SQL Connector feature, select the Use Native Query check box.&lt;BR /&gt;Important:&lt;BR /&gt;&lt;STRONG&gt;l When this option is enabled, the connector cannot execute&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;parameterized queries.&lt;/STRONG&gt;&lt;BR /&gt;l By default, the connector applies transformations to the queries&lt;BR /&gt;emitted by an application to convert the queries into an equivalent&lt;BR /&gt;form in HiveQL. If the application is Spark-aware and already emits&lt;BR /&gt;HiveQL, then turning off the translation avoids the additio&lt;/P&gt;&lt;P&gt;from&amp;nbsp;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 18:53:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/unbound-sql-parameter-error/m-p/101278#M1740</guid>
      <dc:creator>PiotrMi</dc:creator>
      <dc:date>2024-12-06T18:53:24Z</dc:date>
    </item>
  </channel>
</rss>

