hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Pivovarov <apivova...@gmail.com>
Subject Re: CSV file reading in hive
Date Fri, 13 Feb 2015 19:28:20 GMT
hive csv serde is available for all hive versions

https://github.com/ogrodnek/csv-serde


DEFAULT_ESCAPE_CHARACTER \
DEFAULT_QUOTE_CHARACTER  "
DEFAULT_SEPARATOR        ,


add jar path/to/csv-serde.jar;   (or put it to hive/hadoop/mr
classpath on all boxes on cluster)

-- you can use custom separator/quote/escape

create table my_table(a string, b string, ...)
 row format serde 'com.bizo.hive.serde.csv.CSVSerde'
 with serdeproperties (
   "separatorChar" = "\t",
   "quoteChar"     = "'",
   "escapeChar"    = "\\"
  )
 stored as textfile
;



On Thu, Feb 12, 2015 at 8:19 PM, Sreeman <sreebalineni@gmail.com> wrote:

>  Hi All,
>
> How all of you are creating hive/Impala table when the CSV file has some
> values with COMMA in between. it is like
>
> sree,12345,"payment made,but it is not successful"
>
>
>
>
>
> I know opencsv serde is there but it is not available in lower versions of
> Hive 14.0
>
>
>

Mime
View raw message