HQL加载数据的几种方法小结:
对于没有创建分区的表(这里都以外部表为例)而言:
create external table if not exists test
(id int,name string)
comment 'This is for test.'
row format delimited
fields terminated by '\t'
location '/in/test';
1.直接在linux中上传文件到hive表对应的location
hadoop fs -put ~/Desktop/11 hive创建表的路径
例如:hadoop fs -put linux文件的路径 /in/test
create external table if not exists test <

本文总结了使用HQL在Hive中加载数据的各种方法,包括从本地文件系统、HDFS以及不同表间进行数据迁移的操作步骤和注意事项。
最低0.47元/天 解锁文章
1680

被折叠的 条评论
为什么被折叠?



