任何人都可以解释如何将数据从HDFS加载到hive外部表而不删除源文件。如果我使用
LOAD DATA INPATH '/user/root/cards/deckofcards.txt' INTO TABLE deck_of_cards;
文件用户/user/root/cards
是否会被删除?
答案 0 :(得分:1)
要将数据加载到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