hive>CREATE EXTERNAL TABLE IMG_ANA(clientIp STRING,tmp1 STRING,tmp2 STRING,time STRING,finename STRING,status STRING,size INT,reffer STRING,useragent STRING,tmp3 STRING,machineip STRING,mastatus STRING,tmp4 INT,tmp5 STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY "|" STORED AS TEXTFILE LOCATION '/img/acchive';
hadoop中已经有相应的数据,但是想通过hive查询时需要建立外联表,然后就可以直接在hive中查询操作。外联表例子如上
阅读(1545) | 评论(0) | 转发(0) |