我们可以在蜂巢的镶板和外部表格中有不同的模式吗?
在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论