At my firm, I see these two commands used frequently, and I\'d like to be aware of the differences, because their functionality seems the same to me:
<
Option 1: Internal table
create table
(name string,
number double);
load data inpath '/directory-path/file.csv' into ;
This command will remove content at source directory and create a internal table
Option 2: External table
create table
(name string,
number double);
location '/directory-path/file.csv';
Create external table and copy the data into table. Now data won't be moved from source. You can drop external table but still source data is available.
When you drop an external table, it only drops the meta data of HIVE table. Data still exists at HDFS file location.
Have a look at this related SE questions regarding use cases for both internal and external tables
Difference between Hive internal tables and external tables?