I have created an external table in Hive
using following:
create external table hpd_txt(
WbanNum INT,
YearMonthDay INT ,
Time INT,
HourlyPrecip INT)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
stored as textfile
location 'hdfs://localhost:9000/user/hive/external';
Now this table is created in location */hive/external
.
Step-1: I loaded data in this table using:
load data inpath '/input/hpd.txt' into table hpd_txt;
the data is successfully loaded in the specified path ( */external/hpd_txt
)
Step-2: I delete the table from */hive/external
path using following:
hadoop fs -rmr /user/hive/external/hpd_txt
Questions:
- why is the table deleted from original path? (
*/input/hpd.txt
is deleted from hdfs but table is created in*/external
path) - After I delete the table from HDFS as in step 2, and again I use show tables; It still gives the table hpd_txt in the external path. so where is this coming from.
Thanks in advance.