Re: how to load TAB_SEPRATED file in hive table

2012-09-27 Thread MiaoMiao
It is very much about your source file. If you choose wrong
separators, then hive will not parse your file correctly.
There are four kinds of separators, making it possible to clearlify
lines, fields, collections, and keyvalues.
You can refer to the following uri on this topic.
https://cwiki.apache.org/Hive/languagemanual-ddl.html#LanguageManualDDL-CreateTable

On Thu, Sep 27, 2012 at 1:48 PM, yogesh dhari  wrote:
> Thanks Ashok :-),
>
> I am not so much aware about regarding storage formats in hive(I am new to
> hive).
>
> Could you please list some of them except those.
>
> 1) space seprated  -->  FIELDS TERMINATED BY  " ";
> 2) Control-A seprated  > FIELDS TERMINATED BY '\001'
> 3) Tab septared  -->   FIELDS TERMINATED BY '\t'
>
> Please list some more.
>
>
> Thanks & Regards
> Yogesh Kumar
>
>
>
>
>
>> From: ashok.sa...@wipro.com
>> To: user@hive.apache.org
>> Subject: RE: how to load TAB_SEPRATED file in hive table
>> Date: Thu, 27 Sep 2012 05:20:11 +
>
>>
>> '\t'
>> 
>> From: yogesh dhari [yogeshdh...@live.com]
>> Sent: Thursday, September 27, 2012 10:42 AM
>> To: hive request
>> Subject: how to load TAB_SEPRATED file in hive table
>>
>> Hi all,
>>
>> I have a file in which records are Tab-Seprated,
>> Please suggest me how to upload such file in Hive table.
>>
>> Like how to specify
>>
>> Create table XYZ (name STRING, roll INT)
>> ROW FORMAT DELIMITED
>> FIELDS TERMINATED BY 
>>
>> Please suggest for "" over here.
>>
>>
>> Thanks & Regards
>> Yogesh Kumar
>>
>> Please do not print this email unless it is absolutely necessary.
>>
>> The information contained in this electronic message and any attachments
>> to this message are intended for the exclusive use of the addressee(s) and
>> may contain proprietary, confidential or privileged information. If you are
>> not the intended recipient, you should not disseminate, distribute or copy
>> this e-mail. Please notify the sender immediately and destroy all copies of
>> this message and any attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient
>> should check this email and any attachments for the presence of viruses. The
>> company accepts no liability for any damage caused by any virus transmitted
>> by this email.
>>
>> www.wipro.com


Re: how to load TAB_SEPRATED file in hive table

2012-09-26 Thread Bejoy KS
Hi Yogesh

Which ever character is the column separator in your input file , you need to 
provide that in
FIELDS TERMINATED BY clause.

Also the common storage formats supported by hive includes
- Text File
- Sequence File
- RC File etc


Regards
Bejoy KS

Sent from handheld, please excuse typos.

-Original Message-
From: yogesh dhari 
Date: Thu, 27 Sep 2012 11:18:17 
To: hive request
Reply-To: user@hive.apache.org
Subject: RE: how to load TAB_SEPRATED file in hive table


Thanks Ashok :-),

I am not so much aware about regarding storage formats in hive(I am new to 
hive).

Could you please list some of them except those.

1) space seprated  -->  FIELDS TERMINATED BY  " ";
2) Control-A seprated  > FIELDS TERMINATED BY '\001'
3) Tab septared  -->   FIELDS TERMINATED BY '\t'

Please list some more.

Thanks & Regards
Yogesh Kumar





> From: ashok.sa...@wipro.com
> To: user@hive.apache.org
> Subject: RE: how to load TAB_SEPRATED file in hive table
> Date: Thu, 27 Sep 2012 05:20:11 +
> 
> '\t'
> 
> From: yogesh dhari [yogeshdh...@live.com]
> Sent: Thursday, September 27, 2012 10:42 AM
> To: hive request
> Subject: how to load TAB_SEPRATED file in hive table
> 
> Hi all,
> 
> I have a file in which records are Tab-Seprated,
> Please suggest me how to upload such file in Hive table.
> 
> Like how to specify
> 
> Create table XYZ (name STRING, roll INT)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY  
> 
> Please suggest for "" over here.
> 
> 
> Thanks & Regards
> Yogesh Kumar
> 
> Please do not print this email unless it is absolutely necessary. 
> 
> The information contained in this electronic message and any attachments to 
> this message are intended for the exclusive use of the addressee(s) and may 
> contain proprietary, confidential or privileged information. If you are not 
> the intended recipient, you should not disseminate, distribute or copy this 
> e-mail. Please notify the sender immediately and destroy all copies of this 
> message and any attachments. 
> 
> WARNING: Computer viruses can be transmitted via email. The recipient should 
> check this email and any attachments for the presence of viruses. The company 
> accepts no liability for any damage caused by any virus transmitted by this 
> email. 
> 
> www.wipro.com
  


RE: how to load TAB_SEPRATED file in hive table

2012-09-26 Thread yogesh dhari

Thanks Ashok :-),

I am not so much aware about regarding storage formats in hive(I am new to 
hive).

Could you please list some of them except those.

1) space seprated  -->  FIELDS TERMINATED BY  " ";
2) Control-A seprated  > FIELDS TERMINATED BY '\001'
3) Tab septared  -->   FIELDS TERMINATED BY '\t'

Please list some more.

Thanks & Regards
Yogesh Kumar





> From: ashok.sa...@wipro.com
> To: user@hive.apache.org
> Subject: RE: how to load TAB_SEPRATED file in hive table
> Date: Thu, 27 Sep 2012 05:20:11 +
> 
> '\t'
> 
> From: yogesh dhari [yogeshdh...@live.com]
> Sent: Thursday, September 27, 2012 10:42 AM
> To: hive request
> Subject: how to load TAB_SEPRATED file in hive table
> 
> Hi all,
> 
> I have a file in which records are Tab-Seprated,
> Please suggest me how to upload such file in Hive table.
> 
> Like how to specify
> 
> Create table XYZ (name STRING, roll INT)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY  
> 
> Please suggest for "" over here.
> 
> 
> Thanks & Regards
> Yogesh Kumar
> 
> Please do not print this email unless it is absolutely necessary. 
> 
> The information contained in this electronic message and any attachments to 
> this message are intended for the exclusive use of the addressee(s) and may 
> contain proprietary, confidential or privileged information. If you are not 
> the intended recipient, you should not disseminate, distribute or copy this 
> e-mail. Please notify the sender immediately and destroy all copies of this 
> message and any attachments. 
> 
> WARNING: Computer viruses can be transmitted via email. The recipient should 
> check this email and any attachments for the presence of viruses. The company 
> accepts no liability for any damage caused by any virus transmitted by this 
> email. 
> 
> www.wipro.com
  

RE: how to load TAB_SEPRATED file in hive table

2012-09-26 Thread ashok.samal
'\t'

From: yogesh dhari [yogeshdh...@live.com]
Sent: Thursday, September 27, 2012 10:42 AM
To: hive request
Subject: how to load TAB_SEPRATED file in hive table

Hi all,

I have a file in which records are Tab-Seprated,
Please suggest me how to upload such file in Hive table.

Like how to specify

Create table XYZ (name STRING, roll INT)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY  

Please suggest for "" over here.


Thanks & Regards
Yogesh Kumar

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com