<?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 Troubleshooting _handle_rpc_error GRPC Error in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/61509#M31812</link>
    <description>&lt;P&gt;I am trying to run the following chunk of code in the cell of a Databricks notebook (using Databricks runtime 14.3 LTS, Apache spark 3.5.0, scala 2.12):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;spark.sql("CREATE OR REPLACE table &lt;SPAN&gt;sample_catalog.&lt;SPAN&gt;sample_schema.sample_table_tmp AS SELECT * FROM &lt;SPAN&gt;sample_catalog.&lt;SPAN&gt;sample_schema.sample_table")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;df = spark.sql("SELECT * FROM &lt;SPAN&gt;sample_catalog.&lt;SPAN&gt;sample_schema.sample_table_tmp")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;if df is not &lt;SPAN&gt;None:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; if not df.isEmpty():&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; &amp;nbsp; display(df)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;del(df)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;spark.sql("DROP TABLE IF EXISTS &lt;SPAN&gt;sample_catalog.&lt;SPAN&gt;sample_schema.sample_table_tmp")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After successfully running the "display() function, the above code errors out, during the last line when it is trying to drop the table, with the following message:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;2024-02-22 17:12:10,508 34507 ERROR _handle_rpc_error GRPC Error received&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "/databricks/spark/python/pyspark/sql/connect/client/core.py", line 1312, in _analyze&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resp = self._stub.AnalyzePlan(req, metadata=self._builder.metadata())&lt;BR /&gt;&amp;nbsp; File "/databricks/python/lib/python3.10/site-packages/grpc/_channel.py", line 946, in __call__&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _end_unary_response_blocking(state, call, False, None)&lt;BR /&gt;&amp;nbsp; File "/databricks/python/lib/python3.10/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise _InactiveRpcError(state)&lt;BR /&gt;grpc._channel._InactiveRpcError: &amp;lt;_InactiveRpcError of RPC that terminated with:&lt;BR /&gt;  status = StatusCode.INTERNAL&lt;BR /&gt;  details = "[TABLE_OR_VIEW_NOT_FOUND] The table or view `sample_catalog`.`sample_schema`.`sample_table_tmp` cannot be found. Verify the spelling and correctness of the schema and catalog.&lt;BR /&gt;If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.&lt;BR /&gt;To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14;&lt;BR /&gt;'Project [*]&lt;BR /&gt;+- 'UnresolvedRelation [sample_catalog, sample_schema, sample_table_tmp], [], false&lt;BR /&gt;"&lt;BR /&gt;  debug_error_string = "UNKNOWN:Error received from peer unix:/databricks/sparkconnect/grpc.sock {created_time:"2024-02-22T17:12:10.508374255+00:00", grpc_status:13, grpc_message:"[TABLE_OR_VIEW_NOT_FOUND] The table or view `sample_catalog`.`sample_schema`.`sample_table_tmp` cannot be found. Verify the spelling and correctness of the schema and catalog.\nIf you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.\nTo tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14;\n\'Project [*]\n+- \'UnresolvedRelation [sample_catalog, sample_schema, sample_table_tmp], [], false\n"}"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not clear to me that the error message is accurately explaining the problem here.&lt;/P&gt;&lt;P&gt;1) The table in question does not appear to be missing, as the display() command worked fine, so that table was clearly visible,&lt;/P&gt;&lt;P&gt;2) the last command uses "DROP TABLE IF EXISTS", not "DROP TABLE", and&lt;/P&gt;&lt;P&gt;3) the exact same code above works fine when I move the last line of code (i.e. the "spark.sql("DROP TABLE ...)") into a subsequent cell, and run the the two cells consecutively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if there is something going on behind the scenes with the data distributing, that is complicating things.&amp;nbsp; Could anyone please explain to me what is causing this error?&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 19:38:31 GMT</pubDate>
    <dc:creator>mvmiller</dc:creator>
    <dc:date>2024-02-22T19:38:31Z</dc:date>
    <item>
      <title>Troubleshooting _handle_rpc_error GRPC Error</title>
      <link>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/61509#M31812</link>
      <description>&lt;P&gt;I am trying to run the following chunk of code in the cell of a Databricks notebook (using Databricks runtime 14.3 LTS, Apache spark 3.5.0, scala 2.12):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;spark.sql("CREATE OR REPLACE table &lt;SPAN&gt;sample_catalog.&lt;SPAN&gt;sample_schema.sample_table_tmp AS SELECT * FROM &lt;SPAN&gt;sample_catalog.&lt;SPAN&gt;sample_schema.sample_table")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;df = spark.sql("SELECT * FROM &lt;SPAN&gt;sample_catalog.&lt;SPAN&gt;sample_schema.sample_table_tmp")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;if df is not &lt;SPAN&gt;None:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; if not df.isEmpty():&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; &amp;nbsp; display(df)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;del(df)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;spark.sql("DROP TABLE IF EXISTS &lt;SPAN&gt;sample_catalog.&lt;SPAN&gt;sample_schema.sample_table_tmp")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After successfully running the "display() function, the above code errors out, during the last line when it is trying to drop the table, with the following message:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;2024-02-22 17:12:10,508 34507 ERROR _handle_rpc_error GRPC Error received&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "/databricks/spark/python/pyspark/sql/connect/client/core.py", line 1312, in _analyze&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resp = self._stub.AnalyzePlan(req, metadata=self._builder.metadata())&lt;BR /&gt;&amp;nbsp; File "/databricks/python/lib/python3.10/site-packages/grpc/_channel.py", line 946, in __call__&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _end_unary_response_blocking(state, call, False, None)&lt;BR /&gt;&amp;nbsp; File "/databricks/python/lib/python3.10/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise _InactiveRpcError(state)&lt;BR /&gt;grpc._channel._InactiveRpcError: &amp;lt;_InactiveRpcError of RPC that terminated with:&lt;BR /&gt;  status = StatusCode.INTERNAL&lt;BR /&gt;  details = "[TABLE_OR_VIEW_NOT_FOUND] The table or view `sample_catalog`.`sample_schema`.`sample_table_tmp` cannot be found. Verify the spelling and correctness of the schema and catalog.&lt;BR /&gt;If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.&lt;BR /&gt;To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14;&lt;BR /&gt;'Project [*]&lt;BR /&gt;+- 'UnresolvedRelation [sample_catalog, sample_schema, sample_table_tmp], [], false&lt;BR /&gt;"&lt;BR /&gt;  debug_error_string = "UNKNOWN:Error received from peer unix:/databricks/sparkconnect/grpc.sock {created_time:"2024-02-22T17:12:10.508374255+00:00", grpc_status:13, grpc_message:"[TABLE_OR_VIEW_NOT_FOUND] The table or view `sample_catalog`.`sample_schema`.`sample_table_tmp` cannot be found. Verify the spelling and correctness of the schema and catalog.\nIf you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.\nTo tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 1 pos 14;\n\'Project [*]\n+- \'UnresolvedRelation [sample_catalog, sample_schema, sample_table_tmp], [], false\n"}"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not clear to me that the error message is accurately explaining the problem here.&lt;/P&gt;&lt;P&gt;1) The table in question does not appear to be missing, as the display() command worked fine, so that table was clearly visible,&lt;/P&gt;&lt;P&gt;2) the last command uses "DROP TABLE IF EXISTS", not "DROP TABLE", and&lt;/P&gt;&lt;P&gt;3) the exact same code above works fine when I move the last line of code (i.e. the "spark.sql("DROP TABLE ...)") into a subsequent cell, and run the the two cells consecutively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if there is something going on behind the scenes with the data distributing, that is complicating things.&amp;nbsp; Could anyone please explain to me what is causing this error?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 19:38:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/61509#M31812</guid>
      <dc:creator>mvmiller</dc:creator>
      <dc:date>2024-02-22T19:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting _handle_rpc_error GRPC Error</title>
      <link>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/63296#M32208</link>
      <description>&lt;P&gt;Per correspondence with Databricks, this appears to have been a bug which they are in the process of resolving.&amp;nbsp; As an additional observation, in the above code, the table appears to get deleted, in spite of the error message.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 21:28:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/63296#M32208</guid>
      <dc:creator>mvmiller</dc:creator>
      <dc:date>2024-03-11T21:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting _handle_rpc_error GRPC Error</title>
      <link>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/64148#M32477</link>
      <description>&lt;P&gt;Hi, any update on the issue? I am facing the same error while writing stream from autoloader connected to Azure Blob.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2024-03-20 02:12:11,971 1542 ERROR _handle_rpc_error GRPC Error received Traceback (most recent call last): File "/databricks/spark/python/pyspark/sql/connect/client/core.py", line 1469, in _execute_and_fetch_as_iterator for b in generator: File "/usr/lib/python3.10/_collections_abc.py", line 330, in __next__ return self.send(None) File "/databricks/spark/python/pyspark/sql/connect/client/reattach.py", line 132, in send if not self._has_next(): File "/databricks/spark/python/pyspark/sql/connect/client/reattach.py", line 193, in _has_next raise e File "/databricks/spark/python/pyspark/sql/connect/client/reattach.py", line 165, in _has_next self._current = self._call_iter( File "/databricks/spark/python/pyspark/sql/connect/client/reattach.py", line 280, in _call_iter raise e File "/databricks/spark/python/pyspark/sql/connect/client/reattach.py", line 262, in _call_iter return iter_fun() File "/databricks/spark/python/pyspark/sql/connect/client/reattach.py", line 166, in &amp;lt;lambda&amp;gt; lambda: next(self._iterator) # type: ignore[arg-type] File "/databricks/python/lib/python3.10/site-packages/grpc/_channel.py", line 426, in __next__ return self._next() File "/databricks/python/lib/python3.10/site-packages/grpc/_channel.py", line 826, in _next raise self grpc._channel._MultiThreadedRendezvous: &amp;lt;_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.INTERNAL details = "" debug_error_string = "UNKNOWN:Error received from peer unix:/databricks/sparkconnect/grpc.sock {created_time:"2024-03-20T02:12:11.970061559+00:00", grpc_status:13, grpc_message:""}" &amp;gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 07:20:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/64148#M32477</guid>
      <dc:creator>uzi49</dc:creator>
      <dc:date>2024-03-20T07:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting _handle_rpc_error GRPC Error</title>
      <link>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/91491#M38175</link>
      <description>&lt;P&gt;Hello, any updates on this issue? Also facing a simular issue while joining data in the unity catalog,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error received from peer unix:/databricks/sparkconnect/grpc.sock {created_time:"2024-09-23T17:50:35.235314263+00:00", grpc_status:2, grpc_message:"" Exception: [RETRIES_EXCEEDED] The maximum number of retries has been exceeded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 21:07:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/91491#M38175</guid>
      <dc:creator>trm</dc:creator>
      <dc:date>2024-09-23T21:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Troubleshooting _handle_rpc_error GRPC Error</title>
      <link>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/97286#M39465</link>
      <description>&lt;P&gt;Following. Also having this issue, but within the context of pivoting a DF, then aggregating by *&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 18:57:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/troubleshooting-handle-rpc-error-grpc-error/m-p/97286#M39465</guid>
      <dc:creator>kunalmishra9</dc:creator>
      <dc:date>2024-11-01T18:57:00Z</dc:date>
    </item>
  </channel>
</rss>

