You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using spark-snowflake connector client library in my spark application. And there is a Snowflake server which has case sensitive attribute names. In the snowflake console, when I execute this ALTER SESSION SET QUOTED_IDENTIFIERS_IGNORE_CASE = TRUE; I don't need to provide double quotes ("") while executing the SELECT query. Like SELECT c1 FROM schema.table works perfectly. I wanted the similar behaviour in my spark application and followed this documentation to set the above session parameter.
Column name in the Spark DataFrame has double quotes as in ["Date"] where it should be [Date] with no quotes around.
Direct JDBC connection works fine.
You can refer to the explanation of the property from official docs. Note that even though the explanation is mentioned only for write dataframe operation, to snowflake from spark, this works for reading data as well.
I validated through databricks 13.2 version (spark 3.4.0), so hopefully you can give it a try in your local spark application as well and let me know if you see any issues.
Also, USE columnmap if writing data to snowflake to avoid such issues, for read, this property is ignored.
Hi,
I'm using spark-snowflake connector client library in my spark application. And there is a Snowflake server which has case sensitive attribute names. In the snowflake console, when I execute this
ALTER SESSION SET QUOTED_IDENTIFIERS_IGNORE_CASE = TRUE;
I don't need to provide double quotes ("") while executing theSELECT
query. LikeSELECT c1 FROM schema.table
works perfectly. I wanted the similar behaviour in my spark application and followed this documentation to set the above session parameter.Versions:
spark: 3.3.1
scala: 2.12.17
spark-snowflake: 2.11.1-spark_3.3
snowflake-jdbc: 3.13.29
Here is the code I used and the output. Dataframe columns are still coming in double quotes. Any help on this please ?
@sfc-gh-mrui
The text was updated successfully, but these errors were encountered: