我们可以在蜂巢的镶板和外部表格中有不同的模式吗?

发布于 2025-01-29 21:31:27 字数 536 浏览 3 评论 0原文

在Hive外部表和Parquet文件中,我们可以拥有多种数据类型,但列名称相同? 例如,我可以在镶木quet文件中的所有字段中都有文本并将蜂巢表中的数据类型定义为十进制,整数或布尔值?

例如: 镶木模式:

root
 |-- empId: string (nullable = true)
 |-- refrenId: string (nullable = true)
 |-- position: string (nullable = true)
 |-- joiningdate: string (nullable = true)

Hive:

|-- empId: integer (nullable = true)
|-- refrenId: integer (nullable = true)
|-- position: string (nullable = true)
|-- joiningdate: date(nullable = true)

如果这是不可行的,那么如何支持与各种数据类型的可比功能?

In hive external tables and parquet files, can we have various data types but the same column names?
For example, can I have all fields in parquet files be text and define the data types in hive tables to be decimal, integer, or boolean?

For eg:
parquet schema:

root
 |-- empId: string (nullable = true)
 |-- refrenId: string (nullable = true)
 |-- position: string (nullable = true)
 |-- joiningdate: string (nullable = true)

hive :

|-- empId: integer (nullable = true)
|-- refrenId: integer (nullable = true)
|-- position: string (nullable = true)
|-- joiningdate: date(nullable = true)

If this is not feasible, how may this comparable capability with various data types be supported?

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

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

发布评论

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