<分区>
谁能解释如何在不删除源文件的情况下将数据从 HDFS 加载到 Hive 外部表。如果我使用
LOAD DATA INPATH '/user/root/cards/deckofcards.txt' INTO TABLE deck_of_cards;
文件用户 /user/root/cards
会被删除吗?
<分区>
谁能解释如何在不删除源文件的情况下将数据从 HDFS 加载到 Hive 外部表。如果我使用
LOAD DATA INPATH '/user/root/cards/deckofcards.txt' INTO TABLE deck_of_cards;
文件用户 /user/root/cards
会被删除吗?
最佳答案
为了将数据加载到 Hive 表中,我们可以使用
例子:-
create external table table_name (
id int,
field_name string
)
row format delimited
fields terminated by <any delimiter>
location '/hdfs_location';
例子:-
create table table_name (
id int,
field_name string
)
row format delimited
fields terminated by <any delimiter>
location '/hdfs_location';
找出什么样的表 :- describe formatted table_name
关于hadoop - 从 HDFS 加载数据到 hive,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42742121/