<?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 databricks jdbc driver integration return rows having column names as values in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/spark-databricks-jdbc-driver-integration-return-rows-having/m-p/58611#M31214</link>
    <description>&lt;DIV&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i am using below to code to query table but query returns rows having column names as values&lt;/P&gt;&lt;PRE&gt;spark.read&lt;BR /&gt;   .format(&lt;SPAN&gt;"jdbc"&lt;/SPAN&gt;)&lt;BR /&gt;   .option(&lt;SPAN&gt;"url"&lt;/SPAN&gt;, &lt;SPAN&gt;"jdbc:databricks://acme.cloud.databricks.com:443/myschema;transportMode=http;ssl=1;httpPath=&amp;lt;httppath&amp;gt;;AuthMech=3;UID=token;PWD=&amp;lt;token&amp;gt;;"&lt;/SPAN&gt;)&lt;BR /&gt;   .option(&lt;SPAN&gt;"dbtable"&lt;/SPAN&gt;, &lt;SPAN&gt;"mytable"&lt;/SPAN&gt;)&lt;BR /&gt;   .load().show()&lt;/PRE&gt;&lt;P&gt;+---+---------+&lt;BR /&gt;|key|value|&lt;BR /&gt;+---+---------+&lt;BR /&gt;|key|value|&lt;BR /&gt;|key|value|&lt;BR /&gt;|key|value|&lt;BR /&gt;|key|value|&lt;BR /&gt;&lt;BR /&gt;jdbc driver version is 2.6.36&lt;BR /&gt;&lt;BR /&gt;note&amp;nbsp;that odbc driver works but i dont support struct, map, array as column names .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 29 Jan 2024 16:01:59 GMT</pubDate>
    <dc:creator>manohar3</dc:creator>
    <dc:date>2024-01-29T16:01:59Z</dc:date>
    <item>
      <title>spark databricks jdbc driver integration return rows having column names as values</title>
      <link>https://community.databricks.com/t5/data-engineering/spark-databricks-jdbc-driver-integration-return-rows-having/m-p/58611#M31214</link>
      <description>&lt;DIV&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i am using below to code to query table but query returns rows having column names as values&lt;/P&gt;&lt;PRE&gt;spark.read&lt;BR /&gt;   .format(&lt;SPAN&gt;"jdbc"&lt;/SPAN&gt;)&lt;BR /&gt;   .option(&lt;SPAN&gt;"url"&lt;/SPAN&gt;, &lt;SPAN&gt;"jdbc:databricks://acme.cloud.databricks.com:443/myschema;transportMode=http;ssl=1;httpPath=&amp;lt;httppath&amp;gt;;AuthMech=3;UID=token;PWD=&amp;lt;token&amp;gt;;"&lt;/SPAN&gt;)&lt;BR /&gt;   .option(&lt;SPAN&gt;"dbtable"&lt;/SPAN&gt;, &lt;SPAN&gt;"mytable"&lt;/SPAN&gt;)&lt;BR /&gt;   .load().show()&lt;/PRE&gt;&lt;P&gt;+---+---------+&lt;BR /&gt;|key|value|&lt;BR /&gt;+---+---------+&lt;BR /&gt;|key|value|&lt;BR /&gt;|key|value|&lt;BR /&gt;|key|value|&lt;BR /&gt;|key|value|&lt;BR /&gt;&lt;BR /&gt;jdbc driver version is 2.6.36&lt;BR /&gt;&lt;BR /&gt;note&amp;nbsp;that odbc driver works but i dont support struct, map, array as column names .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Jan 2024 16:01:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/spark-databricks-jdbc-driver-integration-return-rows-having/m-p/58611#M31214</guid>
      <dc:creator>manohar3</dc:creator>
      <dc:date>2024-01-29T16:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: spark databricks jdbc driver integration return rows having column names as values</title>
      <link>https://community.databricks.com/t5/data-engineering/spark-databricks-jdbc-driver-integration-return-rows-having/m-p/58615#M31215</link>
      <description>&lt;P&gt;any idea what causing this? please note that above query i am running from standalone spark application also&amp;nbsp;when i run above in databricks notebook i see expected result&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 17:25:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/spark-databricks-jdbc-driver-integration-return-rows-having/m-p/58615#M31215</guid>
      <dc:creator>manohar3</dc:creator>
      <dc:date>2024-01-29T17:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: spark databricks jdbc driver integration return rows having column names as values</title>
      <link>https://community.databricks.com/t5/data-engineering/spark-databricks-jdbc-driver-integration-return-rows-having/m-p/58769#M31262</link>
      <description>&lt;P&gt;This seems to be issue with spark and was able to fix issue by following posts&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/47020379/bigquery-simba-jdbc-error-with-spark" target="_blank"&gt;https://stackoverflow.com/questions/47020379/bigquery-simba-jdbc-error-with-spark&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/68013347/how-to-register-a-jdbc-spark-dialect-in-python/71913245#71913245" target="_blank"&gt;https://stackoverflow.com/questions/68013347/how-to-register-a-jdbc-spark-dialect-in-python/71913245#71913245&lt;/A&gt;&lt;/P&gt;&lt;P&gt;fix is to update function in &lt;A href="https://github.com/apache/spark/blob/ce5ddad990373636e94071e7cef2f31021add07b/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala#L171" target="_blank"&gt;JdbcDialects.scala&lt;/A&gt;&lt;/P&gt;&lt;P&gt;def quoteIdentifier(colName: String): String = {&lt;BR /&gt;colName&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/spark/blob/ce5ddad990373636e94071e7cef2f31021add07b/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala#L171" target="_blank"&gt;https://github.com/apache/spark/blob/ce5ddad990373636e94071e7cef2f31021add07b/sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala#L171&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 02:41:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/spark-databricks-jdbc-driver-integration-return-rows-having/m-p/58769#M31262</guid>
      <dc:creator>manohar3</dc:creator>
      <dc:date>2024-01-31T02:41:59Z</dc:date>
    </item>
  </channel>
</rss>

