<?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: SQL Error when querying any tables/views on a Databricks cluster via Dbeaver. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13808#M8413</link>
    <description>&lt;P&gt;You can try to prefix the path with dbfs:/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also do tests from within databricks without using the JDBC driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also use the Databricks Simba JDBC driver. You can download the driver on &lt;A href="https://databricks.com/spark/jdbc-drivers-download?_ga=2.198791215.1433237262.1657645460-440078606.1655449547" target="test_blank"&gt;https://databricks.com/spark/jdbc-drivers-download?_ga=2.198791215.1433237262.1657645460-440078606.1655449547&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still have problems, you can use the legacy spark driver as described here &lt;A href="https://docs.databricks.com/integrations/bi/jdbc-odbc-bi.html#building-the-connection-url-for-the-legacy-spark-driver" target="test_blank"&gt;https://docs.databricks.com/integrations/bi/jdbc-odbc-bi.html#building-the-connection-url-for-the-legacy-spark-driver&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 17:20:20 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2022-07-12T17:20:20Z</dc:date>
    <item>
      <title>SQL Error when querying any tables/views on a Databricks cluster via Dbeaver.</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13807#M8412</link>
      <description>&lt;P&gt;I am able to connect to the cluster, browse its hive catalog, see tables/views and columns/datatypes&lt;/P&gt;&lt;P&gt;Running a simple select statement from a view on a parquet file produces this error and no other results:&lt;/P&gt;&lt;P&gt;"SQL Error [500540] [HY000]: [Databricks][DatabricksJDBCDriver](500540) Error caught in BackgroundFetcher. Foreground thread ID: 180. Background thread ID: 223. Error caught: sun.misc.Unsafe or java.nio.DirectByteBuffer.&amp;lt;init&amp;gt;(long, int) not available."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard Databricks cluster:&lt;/P&gt;&lt;P&gt;Standard_DS3_v2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advanced Options Spark Config:&lt;/P&gt;&lt;P&gt;spark.databricks.cluster.profile singleNode&lt;/P&gt;&lt;P&gt;spark.databricks.io.directoryCommit.createSuccessFile false&lt;/P&gt;&lt;P&gt;spark.master local[*, 4]&lt;/P&gt;&lt;P&gt;spark.driver.extraJavaOptions -Dio.netty.tryReflectionSetAccessible=true&lt;/P&gt;&lt;P&gt;spark.hadoop.fs.azure.account.key.&amp;lt;reducted&amp;gt;.blob.core.windows.net &amp;lt;reducted&amp;gt;&lt;/P&gt;&lt;P&gt;spark.executor.extraJavaOptions -Dio.netty.tryReflectionSetAccessible=true&lt;/P&gt;&lt;P&gt;parquet.enable.summary-metadata false&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My local machine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dbeaver Version 22.1.2.202207091909&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dbeaver JDBC URL:&lt;/P&gt;&lt;P&gt;jdbc:databricks://&amp;lt;reducted&amp;gt;.1.azuredatabricks.net:443/default;transportMode=http;ssl=1;httpPath=sql/protocolv1/o/&amp;lt;reducted&amp;gt;/&amp;lt;reducted&amp;gt;;AuthMech=3;UID=token;PWD=&amp;lt;reducted&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MacOS version (M1 chip): Monterey 12.4&lt;/P&gt;&lt;P&gt;Java version: &lt;/P&gt;&lt;P&gt;java --version&lt;/P&gt;&lt;P&gt;openjdk 18.0.1 2022-04-19&lt;/P&gt;&lt;P&gt;OpenJDK Runtime Environment Homebrew (build 18.0.1+0)&lt;/P&gt;&lt;P&gt;OpenJDK 64-Bit Server VM Homebrew (build 18.0.1+0, mixed mode, sharing)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to do the following with no errors (Databricks default test dataset):&lt;/P&gt;&lt;P&gt;CREATE TABLE diamonds USING CSV OPTIONS (path "/databricks-datasets/Rdatasets/data-001/csv/ggplot2/diamonds.csv", header "true");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run this "select color from diamonds;" or this "select * from diamonds;"&lt;/P&gt;&lt;P&gt;I get this:&lt;/P&gt;&lt;P&gt;"SQL Error [500618] [HY000]: [Databricks][DatabricksJDBCDriver](500618) Error occured while deserializing arrow data: sun.misc.Unsafe or java.nio.DirectByteBuffer.&amp;lt;init&amp;gt;(long, int) not available"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence, any select query on any object (parquet file or anything else) causes the error described above.&lt;/P&gt;&lt;P&gt;What could be the problem? Any recommendations how to resolve this error? Why am I able to connect and see the metadata of the schemas/tables/views/columns, but not query or view the data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I followed this guide exactly: &lt;A href="https://docs.microsoft.com/en-us/azure/databricks/dev-tools/dbeaver#step-3-connect-dbeaver-to-your-azure-databricks-databases" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/databricks/dev-tools/dbeaver#step-3-connect-dbeaver-to-your-azure-databricks-databases&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 15:40:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13807#M8412</guid>
      <dc:creator>sage5616</dc:creator>
      <dc:date>2022-07-12T15:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error when querying any tables/views on a Databricks cluster via Dbeaver.</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13808#M8413</link>
      <description>&lt;P&gt;You can try to prefix the path with dbfs:/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also do tests from within databricks without using the JDBC driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also use the Databricks Simba JDBC driver. You can download the driver on &lt;A href="https://databricks.com/spark/jdbc-drivers-download?_ga=2.198791215.1433237262.1657645460-440078606.1655449547" target="test_blank"&gt;https://databricks.com/spark/jdbc-drivers-download?_ga=2.198791215.1433237262.1657645460-440078606.1655449547&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still have problems, you can use the legacy spark driver as described here &lt;A href="https://docs.databricks.com/integrations/bi/jdbc-odbc-bi.html#building-the-connection-url-for-the-legacy-spark-driver" target="test_blank"&gt;https://docs.databricks.com/integrations/bi/jdbc-odbc-bi.html#building-the-connection-url-for-the-legacy-spark-driver&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 17:20:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13808#M8413</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-07-12T17:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error when querying any tables/views on a Databricks cluster via Dbeaver.</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13809#M8414</link>
      <description>&lt;P&gt;Hi Hubert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My responses:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;"Please also do tests from within databricks without using the JDBC driver." Queries work within databricks without using the JDBC driver.&lt;/LI&gt;&lt;LI&gt;"Please also use the Databricks Simba JDBC driver. You can download the driver on &lt;A href="https://databricks.com/spark/jdbc-drivers-download?_ga=2.198791215.1433237262.1657645460-440078606.1655449547" alt="https://databricks.com/spark/jdbc-drivers-download?_ga=2.198791215.1433237262.1657645460-440078606.1655449547" target="_blank"&gt;https://databricks.com/spark/jdbc-drivers-download?_ga=2.198791215.1433237262.1657645460-440078606.1655449547&lt;/A&gt;". Yes, I am already using the latest Databricks Simba JDBC driver.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I have tried another tool, DbVisualizer, which does not seem to have this issue. The issue is with Dbeaver and the Databricks Simba JDBC driver. I need help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 18:56:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13809#M8414</guid>
      <dc:creator>sage5616</dc:creator>
      <dc:date>2022-07-12T18:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error when querying any tables/views on a Databricks cluster via Dbeaver.</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13810#M8415</link>
      <description>&lt;P&gt;Update. I have tried SQL Workbench/J and encountered exactly the same error(s) as with Dbeaver. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;I have also tried JetBrains DataGrip and it worked flawlessly. Able to connect, browse the databases and query tables/views. &lt;/B&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/databricks/dev-tools/datagrip" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/databricks/dev-tools/datagrip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Either the instructions for Dbeaver and SQL Workbench/J are missing something.&lt;/LI&gt;&lt;LI&gt;Latest Dbeaver and SQL Workbench/J have bugs or need updates in order to work with Databricks JDBC driver.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 20 Jul 2022 14:37:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13810#M8415</guid>
      <dc:creator>sage5616</dc:creator>
      <dc:date>2022-07-20T14:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error when querying any tables/views on a Databricks cluster via Dbeaver.</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13811#M8416</link>
      <description>&lt;P&gt;Which java version are you running with those tools?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try setting the java property io.netty.tryReflectionSetAccessible=true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may be the issue: &lt;A href="https://issues.apache.org/jira/browse/ARROW-7223" alt="https://issues.apache.org/jira/browse/ARROW-7223" target="_blank"&gt;https://issues.apache.org/jira/browse/ARROW-7223&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 01:16:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13811#M8416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-02T01:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error when querying any tables/views on a Databricks cluster via Dbeaver.</title>
      <link>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13812#M8417</link>
      <description>&lt;P&gt;"Which java version are you running with those tools?" - have you seen my original post? It is clearly listed there: &lt;/P&gt;&lt;P&gt;"MacOS version (M1 chip): Monterey 12.4&lt;/P&gt;&lt;P&gt;Java version: &lt;/P&gt;&lt;P&gt;java --version&lt;/P&gt;&lt;P&gt;openjdk 18.0.1 2022-04-19&lt;/P&gt;&lt;P&gt;OpenJDK Runtime Environment Homebrew (build 18.0.1+0)&lt;/P&gt;&lt;P&gt;OpenJDK 64-Bit Server VM Homebrew (build 18.0.1+0, mixed mode, sharing)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Try setting the java property io.netty.tryReflectionSetAccessible=true" - can you please provide clear instructions for how to do that? Which file, where?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, keep in mind JetBrains DataGrip works just fine without setting any additional java properties. It is just Dbeaver and SQL Workbench/J are the tools that have this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Big thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 19:33:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/sql-error-when-querying-any-tables-views-on-a-databricks-cluster/m-p/13812#M8417</guid>
      <dc:creator>sage5616</dc:creator>
      <dc:date>2022-08-12T19:33:42Z</dc:date>
    </item>
  </channel>
</rss>

