You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Mapred Learn <ma...@gmail.com> on 2011/06/23 16:25:15 UTC

Resend -> how to load sequence file with decimal data

> Hi,
> I have a sequence file where The value is text with delimited data and some fields are decimal fields.
> For eg: decimal(16,6). Sample value : 123.456735.
> How do I upload such a sequence file in hive and what shud I give in table definition for decimal values as above ?
> 
> Thanks in advance !
> 

Sent from my iPhone

RE: Resend -> how to load sequence file with decimal data

Posted by Steven Wong <sw...@netflix.com>.
For decimal, your only options in current Hive are STRING and FLOAT/DOUBLE. Or *INT if you remove the decimal point.


From: Mapred Learn [mailto:mapred.learn@gmail.com]
Sent: Monday, June 27, 2011 12:13 PM
To: user@hive.apache.org; mapreduce-user@hadoop.apache.org; cdh-user@cloudera.org
Subject: Re: Resend -> how to load sequence file with decimal data

Hi Steven,
With load data you give some info about data also. As in Tom' White's book:
create external table external_table(dummy string)
location....
load data....

Now dummy string is a field in this data. Similarly, what I have is a dcimal field. How do I specify it in the create command ?



On Fri, Jun 24, 2011 at 5:12 PM, Steven Wong <sw...@netflix.com>> wrote:
Not sure if this is what you're asking for: Hive has a LOAD DATA command. There is no decimal data type.


From: Mapred Learn [mailto:mapred.learn@gmail.com<ma...@gmail.com>]
Sent: Thursday, June 23, 2011 7:25 AM
To: user@hive.apache.org<ma...@hive.apache.org>; mapreduce-user@hadoop.apache.org<ma...@hadoop.apache.org>; cdh-user@cloudera.org<ma...@cloudera.org>
Subject: Resend -> how to load sequence file with decimal data


Hi,
I have a sequence file where The value is text with delimited data and some fields are decimal fields.
For eg: decimal(16,6). Sample value : 123.456735.
How do I upload such a sequence file in hive and what shud I give in table definition for decimal values as above ?

Thanks in advance !

Sent from my iPhone


Re: Resend -> how to load sequence file with decimal data

Posted by Mapred Learn <ma...@gmail.com>.
Hi Steven,
With load data you give some info about data also. As in Tom' White's book:
create external table external_table(dummy string)
location....
load data....

Now dummy string is a field in this data. Similarly, what I have is a dcimal
field. How do I specify it in the create command ?



On Fri, Jun 24, 2011 at 5:12 PM, Steven Wong <sw...@netflix.com> wrote:

>  Not sure if this is what you’re asking for: Hive has a LOAD DATA command.
> There is no decimal data type.****
>
> ** **
>
> ** **
>
> *From:* Mapred Learn [mailto:mapred.learn@gmail.com]
> *Sent:* Thursday, June 23, 2011 7:25 AM
> *To:* user@hive.apache.org; mapreduce-user@hadoop.apache.org;
> cdh-user@cloudera.org
> *Subject:* Resend -> how to load sequence file with decimal data ****
>
> ** **
>
> ** **
>
>  Hi,
> I have a sequence file where The value is text with delimited data and some
> fields are decimal fields.
> For eg: decimal(16,6). Sample value : 123.456735.
> How do I upload such a sequence file in hive and what shud I give in table
> definition for decimal values as above ?
>
> Thanks in advance !****
>
>
> Sent from my iPhone****
>

Re: Resend -> how to load sequence file with decimal data

Posted by Mapred Learn <ma...@gmail.com>.
Hi Steven,
With load data you give some info about data also. As in Tom' White's book:
create external table external_table(dummy string)
location....
load data....

Now dummy string is a field in this data. Similarly, what I have is a dcimal
field. How do I specify it in the create command ?



On Fri, Jun 24, 2011 at 5:12 PM, Steven Wong <sw...@netflix.com> wrote:

>  Not sure if this is what you’re asking for: Hive has a LOAD DATA command.
> There is no decimal data type.****
>
> ** **
>
> ** **
>
> *From:* Mapred Learn [mailto:mapred.learn@gmail.com]
> *Sent:* Thursday, June 23, 2011 7:25 AM
> *To:* user@hive.apache.org; mapreduce-user@hadoop.apache.org;
> cdh-user@cloudera.org
> *Subject:* Resend -> how to load sequence file with decimal data ****
>
> ** **
>
> ** **
>
>  Hi,
> I have a sequence file where The value is text with delimited data and some
> fields are decimal fields.
> For eg: decimal(16,6). Sample value : 123.456735.
> How do I upload such a sequence file in hive and what shud I give in table
> definition for decimal values as above ?
>
> Thanks in advance !****
>
>
> Sent from my iPhone****
>

RE: Resend -> how to load sequence file with decimal data

Posted by Steven Wong <sw...@netflix.com>.
Not sure if this is what you’re asking for: Hive has a LOAD DATA command. There is no decimal data type.


From: Mapred Learn [mailto:mapred.learn@gmail.com]
Sent: Thursday, June 23, 2011 7:25 AM
To: user@hive.apache.org; mapreduce-user@hadoop.apache.org; cdh-user@cloudera.org
Subject: Resend -> how to load sequence file with decimal data


Hi,
I have a sequence file where The value is text with delimited data and some fields are decimal fields.
For eg: decimal(16,6). Sample value : 123.456735.
How do I upload such a sequence file in hive and what shud I give in table definition for decimal values as above ?

Thanks in advance !

Sent from my iPhone