You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by 黄璞 <hu...@bytedance.com> on 2019/09/19 03:46:14 UTC

Hive load data OpenCSVSerde comment control

Hello,

I find that when to load data into table using 'org.apache.hadoop.hive.serde2.OpenCSVSerde’, the field’s comment of table
will be 'from deserializer’. How can I get rid of this comment or customize the comment.

The procedure to produce the problem:
1. Create a table use the hive create SQL, such as:
create table `db`.`table`(
   `field1` string,
   `field2` string,
   `field3` string
) row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde';

2. Load csv file use the hive load data SQL, such as:
load data local inpath 'my/file/path' overwrite into table `db`.`table`;

3. The table schema will be:
field1                  string                  from deserializer
field2                  string                  from deserializer
field3                  string                  from deserializer

Noticed that the comment of every field will be 'from deserializer'.


Thanks!


Re: [External Email] Re: Hive load data OpenCSVSerde comment control

Posted by 黄璞 <hu...@bytedance.com>.
Thanks for your reply.
I want to know how to update those comments.

> 在 2019年9月20日,00:22,Suresh Kumar Sethuramaswamy <ro...@gmail.com> 写道:
> 
> You are concerned about data dictionary getting overwritten?
> 
> 
> Or do you want to know how to update those comments(   from deserializer)?
> 
> 
> Regards 
> Suresh Kumar Sethuramaswamy 
> 
> On Wed, Sep 18, 2019, 11:46 PM 黄璞 <huangpu.beau@bytedance.com <ma...@bytedance.com> wrote:
> Hello,
> 
> I find that when to load data into table using 'org.apache.hadoop.hive.serde2.OpenCSVSerde’, the field’s comment of table
> will be 'from deserializer’. How can I get rid of this comment or customize the comment.
> 
> The procedure to produce the problem:
> 1. Create a table use the hive create SQL, such as:
> create table `db`.`table`(
>    `field1` string,
>    `field2` string,
>    `field3` string
> ) row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde';
> 
> 2. Load csv file use the hive load data SQL, such as:
> load data local inpath 'my/file/path' overwrite into table `db`.`table`;
> 
> 3. The table schema will be:
> field1                  string                  from deserializer
> field2                  string                  from deserializer
> field3                  string                  from deserializer
> 
> Noticed that the comment of every field will be 'from deserializer'.
> 
> 
> Thanks!
> 


Re: Hive load data OpenCSVSerde comment control

Posted by Suresh Kumar Sethuramaswamy <ro...@gmail.com>.
You are concerned about data dictionary getting overwritten?


Or do you want to know how to update those comments(   from deserializer)?


Regards
Suresh Kumar Sethuramaswamy

On Wed, Sep 18, 2019, 11:46 PM 黄璞 <huangpu.beau@bytedance.com wrote:

> Hello,
>
> I find that when to load data into table using
> 'org.apache.hadoop.hive.serde2.OpenCSVSerde’, the field’s comment of table
> will be 'from deserializer’. How can I get rid of this comment or
> customize the comment.
>
> The procedure to produce the problem:
> 1. Create a table use the hive create SQL, such as:
> create table `db`.`table`(
>    `field1` string,
>    `field2` string,
>    `field3` string
> ) row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde';
>
> 2. Load csv file use the hive load data SQL, such as:
> load data local inpath 'my/file/path' overwrite into table `db`.`table`;
>
> 3. The table schema will be:
> field1                  string                  from deserializer
> field2                  string                  from deserializer
> field3                  string                  from deserializer
>
> Noticed that the comment of every field will be 'from deserializer'.
>
>
> Thanks!
>
>