繁体   English   中英

"Hive 表创建成功,但未导入 S3 存储桶中的数据"

[英]Hive table created successfully but data from S3 bucket is not imported

创建了一个表并希望从 S3 存储桶中移动数据。 表已创建,但未从 S3 导入数据。 可能是什么问题呢? 请帮帮我,在此先感谢。

以下是一系列命令和相应的输出:<\/strong>

hive> CREATE TABLE contraceptive_usage_data( wife_age int, wife_edu int, husb_edu int,no_of_children_born int, wife_religion int,
    > wife_now_working int, husb_occu int, stand_living int, media_exposure int, contraceptive_method_used int) ROW FORMAT 
    > DELIMITED FIELDS TERMINATED BY ',' location 's3://emr.learnings/contraceptive_data/contraceptive_usage_data_indonesia_1988';
OK
Time taken: 16.452 seconds
hive> select * from contraceptive_usage_data limit 10;
OK
Time taken: 1.966 seconds
hive> 

尝试使用关键字EXTERNAL,

CREATE EXTERNAL TABLE contraceptive_usage_data( wife_age int, wife_edu int, husb_edu int,no_of_children_born int, wife_religion int,
wife_now_working int, husb_occu int, stand_living int, media_exposure int, contraceptive_method_used int) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' 
LOCATION 's3://emr.learnings/contraceptive_data/contraceptive_usage_data_indonesia_1988';

我认为,如果没有EXTERNAL关键字,Hive将尝试在该位置创建一个新的空表,而不是在该位置加载现有数据。

我认为这是因为每一个之后的空间,在价值观。

"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM