hive的数据表分为两种,内部表和外部表。内部表指hive创建并通过load data inpath进数据库的表,这种表可以理解为数据和表结构都
create external table if not exists database.table1
(
column1 string comment 'comment1',
column2 string comment 'comment2'
)
row format delimited fields terminated by "\t"
stored as inputformat "com.hadoop.mapred.deprecatedlzotextinputformat" outputformat "org.apache.hadoop.hive.ql.io.hiveignorekeytextoutputformat"
location 'hdfs:///data/dw/asf/20120201';