Skip first line of csv while loading in hive table

前端 未结 3 803
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 18:47

Hello Friends,

I created table in hive with help of following command -

CREATE TABLE db.test 
  ( 
     fname STRING, 
     lname S         


        
3条回答
  •  一个人的身影
    2020-12-13 19:04

    To get this you can use hive's property which is TBLPROPERTIES ("skip.header.line.count"="1")
    you can also refer example -

    CREATE TABLE temp 
      ( 
         name STRING, 
         id   INT 
      ) 
    row format delimited fields terminated BY '\t' lines terminated BY '\n' 
    tblproperties("skip.header.line.count"="1"); 
    

提交回复
热议问题