Hive导入HDFS数据

CREATE TABLE `default.kylin_account1`(
  `account_id` bigint,
  `account_buyer_level` int COMMENT 'Account Buyer Level',
  `account_seller_level` int COMMENT 'Account Seller Level',
  `account_country` string COMMENT 'Account Country',
  `account_contact` string COMMENT 'Account Contact Info')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
  'field.delim'=',',
  'serialization.format'=',')
STORED AS INPUTFORMAT
  'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
  'hdfs://DEV2:8020/user/hive/warehouse/kylin_account1'

 

hive导入hdfs数据:

load data inpath '/user/hive/warehouse/kylin_account/DEFAULT.KYLIN_ACCOUNT.csv' into table kylin_account;

你可能感兴趣的:(LINUX)