将文本表中的数据上载到配置单元表时出现格式错误?

9o685dep  于 2021-06-02  发布在  Hadoop
关注(0)|答案(0)|浏览(186)

我可以上传数据,但问题是空值哪里是问题,有一些格式问题?
使用在本地表中创建表*

CREATE TABLE IF NOT EXISTS employee21( eid string, name String,
      salary String, destination String)
       COMMENT 'Employee details'
       ROW FORMAT DELIMITED
       FIELDS TERMINATED BY '\073'
       LINES TERMINATED BY '\n'
       STORED AS TEXTFILE;

正在将表加载到配置单元

LOAD DATA LOCAL INPATH '/home/sma/mit123/s12.txt' INTO TABLE employee21;

     hive> LOAD DATA LOCAL INPATH '/home/mh/m123/s12.txt' INTO TABLE employee21;
     Copying data from file:/home/mh/mh123/s12.txt
     Copying file: file:/home/mh/mh123/s12.txt
     Loading data to table default.employee21
      Table default.employee21 stats: [num_partitions: 0, num_files: 1, num_rows:     0, total_size: 156, raw_data_size: 0]
    OK
    Time taken: 0.702 seconds
        hive> show tables;
         OK
       employee1
       employee11
       employee21
  Time taken: 0.159 seconds, Fetched: 3 row(s)

**checking the table data in hive**

         hive> select * from employee21;
        OK
        1231  mh          45000    Proof reader NULL    NULL    NULL
        1203  Masthanvali 40000    Technical writer NULL    NULL    NULL
        1204  Kiran       40000    Hr Admin NULL    NULL    NULL
        1205  Kranthi     30000    Op Admin NULL    NULL    NULL
       Time taken: 0.104 seconds, Fetched: 4 row(s)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题