获取ORC文件格式错误“它与指定格式不匹配”在蜂巢中

发布于 2025-01-30 10:29:12 字数 514 浏览 1 评论 0原文

我正在尝试以兽人格式写入数据,并遇到以下错误。

Job failed with message [pyspark.sql.utils.AnalysisException: The format of the existing table dbname.tablename is `HiveFileFormat`. It doesn't match the specified format `OrcDataSourceV2`.]. 

以下是Hive Write语句。

df.coalesce(1).write.partitionBy("date").mode('append').format('orc').saveAsTable(
'dbname.tablename'.format(dbname=destination_database))

我不确定是什么原因引起了问题,但它正在上述错误。表格之后格式的目的是什么?

感谢您的帮助,非常感谢。

谢谢,巴布

I am trying to write data to hive table in ORC format and I am getting following error.

Job failed with message [pyspark.sql.utils.AnalysisException: The format of the existing table dbname.tablename is `HiveFileFormat`. It doesn't match the specified format `OrcDataSourceV2`.]. 

Following is hive write statement.

df.coalesce(1).write.partitionBy("date").mode('append').format('orc').saveAsTable(
'dbname.tablename'.format(dbname=destination_database))

I am not sure what is causing the issue but it is throwing above mentioned error. what is the purpose of format after tablename?

Thanks for your help and really appreciate.

Thanks,Bab

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文