Spark: Variant Datatype is not supported

我的梦境 提交于 2019-12-24 09:29:15

问题


While extracting the data from SQL Server of variant data type in Pyspark. i am getting a SQLServerException : "Variant datatype is not supported"

Please advice for any workaround.


回答1:


Converted the column datatype into varchar while fetching and thing worked

SELECT CONVERT(varchar,Code,20) into Code from DBTable


来源:https://stackoverflow.com/questions/40786605/spark-variant-datatype-is-not-supported

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!