<?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 SPARK_GEN_SUBQ_0 WHERE 1=0, Error message from Server: Configuration schema is not available in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/spark-gen-subq-0-where-1-0-error-message-from-server/m-p/75693#M35029</link>
    <description>&lt;P&gt;Hi Community,&lt;BR /&gt;I'm trying to read the data from sample schema from table nation from data-bricks catalog via spark but i'm getting this error.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;com.databricks.client.support.exceptions.GeneralException: [Databricks][JDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: null, Query: SELECT * FROM (SELECT n_nationkey ,n_name ,n_regionkey ,n_comment FROM samples.tpch.nation order by "n_nationkey" limit 50000 offset 0) SPARK_GEN_SUBQ_0 WHERE 1=0, Error message from Server: Configuration schema is not available&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Here is my sample code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyspark.sql import SparkSession
import os

os.environ['SPARK_HOME'] = '/opt/spark'
os.environ['PATH'] = os.environ['SPARK_HOME'] + '/bin:' + os.environ['PATH']
spark_dict = {
  "hostname": "my_hostname",
  "user": "my_user",
  "password": "my_pass",
  "database": "samples",
  "schema": "tpch",
  "driver": "com.databricks.client.jdbc.Driver",
  "url": "jdbc:databricks://host:443/samples;transportMode=http;ssl=1;AuthMech=3;httpPath=httpPath",
  "port": "443",
  "query": "SELECT n_nationkey ,n_name ,n_regionkey ,n_comment FROM samples.tpch.nation order by \"n_nationkey\" limit 50000 offset 0"
}
spark = (
    SparkSession.builder.appName("abc")
    .config("spark.jars", "/home/jars/databricks-jdbc-2.6.34.jar")
    .getOrCreate()
)

df = spark.read.format("jdbc").options(**spark_dict).load()
        
df.show()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please guide me here how to fix the above error.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 10:38:53 GMT</pubDate>
    <dc:creator>HASSAN_UPPAL123</dc:creator>
    <dc:date>2024-06-25T10:38:53Z</dc:date>
    <item>
      <title>SPARK_GEN_SUBQ_0 WHERE 1=0, Error message from Server: Configuration schema is not available</title>
      <link>https://community.databricks.com/t5/data-engineering/spark-gen-subq-0-where-1-0-error-message-from-server/m-p/75693#M35029</link>
      <description>&lt;P&gt;Hi Community,&lt;BR /&gt;I'm trying to read the data from sample schema from table nation from data-bricks catalog via spark but i'm getting this error.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;com.databricks.client.support.exceptions.GeneralException: [Databricks][JDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: null, Query: SELECT * FROM (SELECT n_nationkey ,n_name ,n_regionkey ,n_comment FROM samples.tpch.nation order by "n_nationkey" limit 50000 offset 0) SPARK_GEN_SUBQ_0 WHERE 1=0, Error message from Server: Configuration schema is not available&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Here is my sample code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyspark.sql import SparkSession
import os

os.environ['SPARK_HOME'] = '/opt/spark'
os.environ['PATH'] = os.environ['SPARK_HOME'] + '/bin:' + os.environ['PATH']
spark_dict = {
  "hostname": "my_hostname",
  "user": "my_user",
  "password": "my_pass",
  "database": "samples",
  "schema": "tpch",
  "driver": "com.databricks.client.jdbc.Driver",
  "url": "jdbc:databricks://host:443/samples;transportMode=http;ssl=1;AuthMech=3;httpPath=httpPath",
  "port": "443",
  "query": "SELECT n_nationkey ,n_name ,n_regionkey ,n_comment FROM samples.tpch.nation order by \"n_nationkey\" limit 50000 offset 0"
}
spark = (
    SparkSession.builder.appName("abc")
    .config("spark.jars", "/home/jars/databricks-jdbc-2.6.34.jar")
    .getOrCreate()
)

df = spark.read.format("jdbc").options(**spark_dict).load()
        
df.show()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please guide me here how to fix the above error.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 10:38:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/spark-gen-subq-0-where-1-0-error-message-from-server/m-p/75693#M35029</guid>
      <dc:creator>HASSAN_UPPAL123</dc:creator>
      <dc:date>2024-06-25T10:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: SPARK_GEN_SUBQ_0 WHERE 1=0, Error message from Server: Configuration schema is not available</title>
      <link>https://community.databricks.com/t5/data-engineering/spark-gen-subq-0-where-1-0-error-message-from-server/m-p/75816#M35065</link>
      <description>&lt;P&gt;Hi Community,&lt;BR /&gt;&lt;BR /&gt;I'm still facing the issue can someone please provide me any solution how to fix above error.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 10:16:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/spark-gen-subq-0-where-1-0-error-message-from-server/m-p/75816#M35065</guid>
      <dc:creator>HASSAN_UPPAL123</dc:creator>
      <dc:date>2024-06-26T10:16:01Z</dc:date>
    </item>
  </channel>
</rss>

