Spark:不支持变体数据类型 [英] Spark: Variant Datatype is not supported

查看:73
本文介绍了Spark:不支持变体数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Pyspark 中从 SQL Server 中提取变体数据类型的数据时.我收到 SQLServerException :不支持变体数据类型"

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.

推荐答案

在获取和工作时将列数据类型转换为 varchar

Converted the column datatype into varchar while fetching and thing worked

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

这篇关于Spark:不支持变体数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆