spark databricks jdbc driver integration return rows having column names as values

manohar3
New Contributor III

Hi all,

i am using below to code to query table but query returns rows having column names as values

spark.read
.format("jdbc")
.option("url", "jdbc:databricks://acme.cloud.databricks.com:443/myschema;transportMode=http;ssl=1;httpPath=<httppath>;AuthMech=3;UID=token;PWD=<token>;")
.option("dbtable", "mytable")
.load().show()

+---+---------+
|key|value|
+---+---------+
|key|value|
|key|value|
|key|value|
|key|value|

jdbc driver version is 2.6.36

note that odbc driver works but i dont support struct, map, array as column names .


 

manohar3
New Contributor III

any idea what causing this? please note that above query i am running from standalone spark application also when i run above in databricks notebook i see expected result

manohar3
New Contributor III