hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Richardson <gary.richard...@gmail.com>
Subject Re: Having Troubles with CSV
Date Tue, 17 Feb 2009 18:51:56 GMT
I seemed to have fixed my first problem -- fields are lining up now.

Is there a way to strip the extra "'s from the fields that have them? For
example, MySQL has an 'OPTIONALLY ENCLOSED BY'

Thanks!

On Tue, Feb 17, 2009 at 10:30 AM, Gary Richardson <gary.richardson@gmail.com
> wrote:

> Hi,
>
> I'm playing around with hive for the first time. I have a test data set in
> CSV that I want to import. The CSV was generated with PHP's fputcsv(), so
> it's quoted when whitespace/commas/etc show up in a field. When I do test
> queries, the fields are not mapping into columns properly. Some fields are
> gobbling others and it mostly seems to be at random.
>
> My CREATE statement looks like:
>
> CREATE EXTERNAL TABLE testdata_src (
> // field definitions here
> )
> ROW FORMAT DELIMITED FIELDS TERMINATED BY '\054' LINES TERMINATED BY '\012'
>
> STORED AS TEXTFILE
> LOCATION "/tmp/testimport/";
>
> I'm guessing that I'm doing something wrong. Is there a better way of
> importing my data?
>
> Thanks!
>

Mime
View raw message