<?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 Simba ODBC batch queries in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/simba-odbc-batch-queries/m-p/88577#M37551</link>
    <description>&lt;P&gt;I'm using Simba ODBC driver to Connect to databricks. Since this driver doesn't support transactions, I was trying to run a DELETE and then INSERT query from a within a single execute, but I get an error. Is there an alternate way to perform a batch of operations together so that if one fails, others aren't commited.&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;LI-CODE lang="markup"&gt;org.apache.spark.sql.catalyst.parser.ParseException: 
[PARSE_SYNTAX_ERROR] Syntax error at or near 'DELETE': extra input 'DELETE'. SQLSTATE: 42601 (line 2, pos 1)&lt;/LI-CODE&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;The query that I'm trying to run through single command.ExecuteNonQuery() is:&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;LI-CODE lang="markup"&gt;INSERT into test.samples.employee values('5','value5');
DELETE FROM test.samples.employee where empid = 1;&lt;/LI-CODE&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;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2024 16:32:45 GMT</pubDate>
    <dc:creator>DBUser2</dc:creator>
    <dc:date>2024-09-04T16:32:45Z</dc:date>
    <item>
      <title>Simba ODBC batch queries</title>
      <link>https://community.databricks.com/t5/data-engineering/simba-odbc-batch-queries/m-p/88577#M37551</link>
      <description>&lt;P&gt;I'm using Simba ODBC driver to Connect to databricks. Since this driver doesn't support transactions, I was trying to run a DELETE and then INSERT query from a within a single execute, but I get an error. Is there an alternate way to perform a batch of operations together so that if one fails, others aren't commited.&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;LI-CODE lang="markup"&gt;org.apache.spark.sql.catalyst.parser.ParseException: 
[PARSE_SYNTAX_ERROR] Syntax error at or near 'DELETE': extra input 'DELETE'. SQLSTATE: 42601 (line 2, pos 1)&lt;/LI-CODE&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;The query that I'm trying to run through single command.ExecuteNonQuery() is:&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;LI-CODE lang="markup"&gt;INSERT into test.samples.employee values('5','value5');
DELETE FROM test.samples.employee where empid = 1;&lt;/LI-CODE&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;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 16:32:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/simba-odbc-batch-queries/m-p/88577#M37551</guid>
      <dc:creator>DBUser2</dc:creator>
      <dc:date>2024-09-04T16:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Simba ODBC batch queries</title>
      <link>https://community.databricks.com/t5/data-engineering/simba-odbc-batch-queries/m-p/101323#M40633</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/88514"&gt;@DBUser2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks that delete is not supported at all based on documentation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Write-back&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;The Simba Apache Spark ODBC Connector supports translation for the following&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;syntax when connecting to a Spark Thrift Server instance that is running Spark 1.3 or&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;later:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;l INSERT&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;l CREATE&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;l DROP&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Spark does not support UPDATE or DELETE syntax.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If the statement contains non-standard SQL-92 syntax, then the connector is unable to&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;translate the statement to SQL and instead falls back to using HiveQL.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Doc:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&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;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2024 11:02:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/simba-odbc-batch-queries/m-p/101323#M40633</guid>
      <dc:creator>PiotrMi</dc:creator>
      <dc:date>2024-12-07T11:02:31Z</dc:date>
    </item>
  </channel>
</rss>

