hive 创建表

本文介绍了Hive如何创建表,包括HQL对SQL语句的扩展,允许定义表的数据存储位置和格式。同时提到了Hive自动添加的last_modified_by和last_modified_time属性,用于记录表的修改信息。此外,文章还讲解了如何复制表结构,查看表的详细描述信息,以及使用外部表的相关操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

HQL对sql语句的扩展,可以定义表的数据文件存储在什么位置,以及定义表文件存储格式。

create table if not exists hives.employees(
name string comment 'employee name',
salary float comment 'employee salary',
subordinates array<string> comment 'names of subordinates',
deducations map<string,float> comment 'Keys-value',
address struct <street:string,city:string,state:string,zip:int> comment 'home address')
comment 'Description of the table'
tblproperties('creator'='me','create_at'='20170424')
location '/user/hive/warehouse/hives.db/employees'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值