<?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: PARSE_EMPTY_STATEMENT error when trying to use spark.sql via Databricks Connect in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/83088#M36844</link>
    <description>&lt;P&gt;Have the exact same issue, session seems to be working spark.table("mytable").show() produces results.&lt;/P&gt;&lt;P&gt;Can't get any sql statement to work.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2024 12:22:11 GMT</pubDate>
    <dc:creator>tgaerts</dc:creator>
    <dc:date>2024-08-15T12:22:11Z</dc:date>
    <item>
      <title>PARSE_EMPTY_STATEMENT error when trying to use spark.sql via Databricks Connect</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/80770#M36151</link>
      <description>&lt;P&gt;I'm trying to use Databricks Connect to run queries on Delta Tables locally. However, SQL queries using &lt;FONT face="courier new,courier"&gt;spark.sql&lt;/FONT&gt; don't seem to work properly, even though &lt;FONT face="courier new,courier"&gt;spark.read.table&lt;/FONT&gt; works.&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; from databricks.connect import DatabricksSession&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; spark = DatabricksSession.builder.profile("&amp;lt;profile name&amp;gt;").serverless().getOrCreate()&lt;BR /&gt;WARNING: All log messages before absl::InitializeLog() is called are written to STDERR&lt;BR /&gt;I0000 00:00:1722031752.676173 13015515 config.cc:230] gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; spark.read.table('&amp;lt;table name&amp;gt;')&lt;BR /&gt;DataFrame[...]&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; spark.sql("SELECT * FROM &amp;lt;table name&amp;gt;")&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;  File "/Users/adawson/.pyenv/versions/pyspark/lib/python3.10/site-packages/pyspark/sql/connect/session.py", line 733, in sql&lt;BR /&gt;    data, properties = self.client.execute_command(cmd.command(self._client))&lt;BR /&gt;  File "/Users/adawson/.pyenv/versions/pyspark/lib/python3.10/site-packages/pyspark/sql/connect/client/core.py", line 1270, in execute_command&lt;BR /&gt;    data, _, _, _, properties = self._execute_and_fetch(&lt;BR /&gt;  File "/Users/adawson/.pyenv/versions/pyspark/lib/python3.10/site-packages/pyspark/sql/connect/client/core.py", line 1717, in _execute_and_fetch&lt;BR /&gt;    for response in self._execute_and_fetch_as_iterator(&lt;BR /&gt;  File "/Users/adawson/.pyenv/versions/pyspark/lib/python3.10/site-packages/pyspark/sql/connect/client/core.py", line 1693, in _execute_and_fetch_as_iterator&lt;BR /&gt;    self._handle_error(error)&lt;BR /&gt;  File "/Users/adawson/.pyenv/versions/pyspark/lib/python3.10/site-packages/pyspark/sql/connect/client/core.py", line 2009, in _handle_error&lt;BR /&gt;    self._handle_rpc_error(error)&lt;BR /&gt;  File "/Users/adawson/.pyenv/versions/pyspark/lib/python3.10/site-packages/pyspark/sql/connect/client/core.py", line 2097, in _handle_rpc_error&lt;BR /&gt;    raise convert_exception(&lt;BR /&gt;pyspark.errors.exceptions.connect.ParseException:&lt;BR /&gt;[PARSE_EMPTY_STATEMENT] Syntax error, unexpected empty statement. SQLSTATE: 42617 (line 1, pos 0)&lt;BR /&gt;&lt;BR /&gt;== SQL ==&lt;BR /&gt;&lt;BR /&gt;^^^&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Has anyone else run into this issue? I'm on an M2 Pro Mac, running Python 3.10, pyspark&amp;nbsp;3.5.1,&amp;nbsp;databricks-connect 15.3.1,&amp;nbsp;databricks-sdk 0.29.0, Databricks CLI&amp;nbsp;v0.224.1.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 22:44:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/80770#M36151</guid>
      <dc:creator>Angus-Dawson</dc:creator>
      <dc:date>2024-07-26T22:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: PARSE_EMPTY_STATEMENT error when trying to use spark.sql via Databricks Connect</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/81533#M36338</link>
      <description>&lt;P&gt;Hi Kaniz,&lt;/P&gt;&lt;P&gt;Could you clarify what you mean? I assume the session is correctly initialized since I can use `spark.read.table` without issue, but I don't know what else I should check.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 15:43:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/81533#M36338</guid>
      <dc:creator>Angus-Dawson</dc:creator>
      <dc:date>2024-08-01T15:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: PARSE_EMPTY_STATEMENT error when trying to use spark.sql via Databricks Connect</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/83088#M36844</link>
      <description>&lt;P&gt;Have the exact same issue, session seems to be working spark.table("mytable").show() produces results.&lt;/P&gt;&lt;P&gt;Can't get any sql statement to work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 12:22:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/83088#M36844</guid>
      <dc:creator>tgaerts</dc:creator>
      <dc:date>2024-08-15T12:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: PARSE_EMPTY_STATEMENT error when trying to use spark.sql via Databricks Connect</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/87201#M37410</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I am an engineer working on Databricks Connect. This error appears because of the incompatibility between the Serverless Compute and Databricks Connect versions. The current Serverless Compute release roughly corresponds to Databricks Runtime 15.1, while you are using Databricks Connect 15.3. We guarantee forward compatibility in Databricks Connect Python, which means that Databricks Connect version should be lower than or equal to the Serverless Runtime version. You should switch to using DBConnect 15.1 for now, until Serverless Compute is upgraded.&lt;/P&gt;
&lt;P&gt;Serverless Compute releases currently lag behind Classic DBR releases. We are working on reducing the delay for Serverless Compute releases.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can find the Runtime version used by Serverless compute in these release notes &lt;A href="https://docs.databricks.com/en/release-notes/serverless.html#version-202430" target="_blank"&gt;https://docs.databricks.com/en/release-notes/serverless.html#version-202430&lt;/A&gt;&lt;BR /&gt;and on this page &lt;A href="https://docs.databricks.com/en/dev-tools/databricks-connect/python/install.html" target="_blank"&gt;https://docs.databricks.com/en/dev-tools/databricks-connect/python/install.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 11:21:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/87201#M37410</guid>
      <dc:creator>alex_khakhlyuk</dc:creator>
      <dc:date>2024-09-02T11:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: PARSE_EMPTY_STATEMENT error when trying to use spark.sql via Databricks Connect</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/89270#M37751</link>
      <description>&lt;P&gt;Try using the latest version of databricks-connect for that runtime if you are using cluster, for example if using 14.3 Runtime then use databricks-connect 14.3.2(Python) as for older version I faces the same issue.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 10:25:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/89270#M37751</guid>
      <dc:creator>ShantanuR</dc:creator>
      <dc:date>2024-09-10T10:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: PARSE_EMPTY_STATEMENT error when trying to use spark.sql via Databricks Connect</title>
      <link>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/89525#M37843</link>
      <description>&lt;P&gt;Thank you so much! That did the trick.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 22:13:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/parse-empty-statement-error-when-trying-to-use-spark-sql-via/m-p/89525#M37843</guid>
      <dc:creator>Angus-Dawson</dc:creator>
      <dc:date>2024-09-11T22:13:44Z</dc:date>
    </item>
  </channel>
</rss>

