hive的内外部表

版权声明:版权声明中 https://blog.csdn.net/lds_include/article/details/88757024

hive的内外部表

创建的方式:

  • 外部表
create external table if not exists tablename;
  • 内部表
create table if not exists tablename;

使用场景

  • 内部表: 多应用于临时表、中间表
  • 外部表:用于数据源(较多使用)

区别

  • 内部表:删除的时候就将源数据删除
  • 外部表:删除的时候只鞥删除表结构,不能删除源数据。

猜你喜欢

转载自blog.csdn.net/lds_include/article/details/88757024