Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E894CA32 for ; Thu, 12 Jul 2012 11:23:56 +0000 (UTC) Received: (qmail 79024 invoked by uid 500); 12 Jul 2012 11:23:55 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 78748 invoked by uid 500); 12 Jul 2012 11:23:54 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 78730 invoked by uid 99); 12 Jul 2012 11:23:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2012 11:23:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [203.91.198.75] (HELO wipro-blr-out02.wipro.com) (203.91.198.75) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2012 11:23:46 +0000 X-AuditID: cb5bdd58-b7b82ae0000019f2-de-4ffeb35b4d07 Received: from BLR-OUT-EDG01.wipro.com ( [203.91.193.31]) (using TLS with cipher AES128-SHA (AES128-SHA/128 bits)) (Client did not present a certificate) by wipro-blr-out02.wipro.com (Symantec Mail Security) with SMTP id 6C.0A.06642.B53BEFF4; Thu, 12 Jul 2012 16:52:04 +0530 (IST) Received: from BLR-EC-MBX3.wipro.com (10.208.51.113) by BLR-OUT-EDG01.wipro.com (203.91.193.31) with Microsoft SMTP Server (TLS) id 14.1.289.1; Thu, 12 Jul 2012 16:53:12 +0530 Received: from BLR-EC-MBX7.wipro.com ([169.254.7.121]) by BLR-EC-MBX3.wipro.com ([169.254.3.8]) with mapi id 14.01.0289.001; Thu, 12 Jul 2012 16:51:36 +0530 From: To: Subject: RE: hive opload shows NULL from hdfs Thread-Topic: hive opload shows NULL from hdfs Thread-Index: Ac1gF3S9BXj2MrD9S6enU4s2eZjH1///pVwAgABm/G///6TegIAAYDa/ Date: Thu, 12 Jul 2012 11:21:36 +0000 Message-ID: <2ADA1B0170E3434DA763D609DCD01EB541DC0797@BLR-EC-MBX7.wipro.com> References: <2ADA1B0170E3434DA763D609DCD01EB541DC0767@BLR-EC-MBX7.wipro.com> <2ADA1B0170E3434DA763D609DCD01EB541DC0783@BLR-EC-MBX7.wipro.com>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.200.15.68] Content-Type: text/plain; charset="us-ascii" content-transfer-encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: AAAAAQAAAZE= Yes Mohammad it worked fine,=0A= =0A= Thank you :-)=0A= =0A= Regards=0A= Yogesh Kumar=0A= ______________________________________=0A= From: Mohammad Tariq [dontariq@gmail.com]=0A= Sent: Thursday, July 12, 2012 4:34 PM=0A= To: user@hive.apache.org=0A= Subject: Re: hive opload shows NULL from hdfs=0A= =0A= Did it work fine??=0A= =0A= Regards,=0A= Mohammad Tariq=0A= =0A= =0A= On Thu, Jul 12, 2012 at 4:33 PM, wrote:=0A= > Thanks Mohammad :-)=0A= >=0A= > Regards=0A= > Yogesh Kumar=0A= > ________________________________________=0A= > From: Mohammad Tariq [dontariq@gmail.com]=0A= > Sent: Thursday, July 12, 2012 3:52 PM=0A= > To: user@hive.apache.org=0A= > Subject: Re: hive opload shows NULL from hdfs=0A= >=0A= > Create your table using this command :=0A= >=0A= > create table parthp (no INT , name STRING , result STRING , class INT=0A= > ) row format delimited fields terminated by "," ;=0A= >=0A= > In hive the delimiters are assumed to be ^A(ctrl-a), by default.=0A= >=0A= > Regards,=0A= > Mohammad Tariq=0A= >=0A= >=0A= > On Thu, Jul 12, 2012 at 3:46 PM, wrote:=0A= >> Hi all,=0A= >>=0A= >> I am trying to upload files from hdfs to hive table,=0A= >>=0A= >> file in hdfs are imported by sqoop tool from mysql having table structure= =0A= >>=0A= >> ******************************************=0A= >>=0A= >> no name result class=0A= >> ---------------------------------=0A= >> 6 vishu pass 7=0A= >> 7 hana pass 6=0A= >>=0A= >> ******************************************=0A= >>=0A= >> in hdfs it shows there records as=0A= >>=0A= >> hadoop dfs -cat /try/part/part-m-00003=0A= >> 6,vishu,pass,7=0A= >> 7,hana,pass,6=0A= >>=0A= >> now I have created table in hive ( using same datatype as were in mysql)= =0A= >>=0A= >> create table parthp (no INT , name STRING , result STRING , class INT ) = ;=0A= >>=0A= >> and used this command to upload data into hive table=0A= >>=0A= >> hive> load data inpath 'hdfs://localhost:9000/try/part/part-m-00003' into= =0A= >> table parthp ;=0A= >>=0A= >> and it results.=0A= >>=0A= >> hive> load data inpath 'hdfs://localhost:9000/try/part/part-m-00003' into= =0A= >> table parthp ;=0A= >> Loading data to table default.parthp=0A= >> OK=0A= >> Time taken: 0.145 seconds=0A= >>=0A= >> now if i do=0A= >>=0A= >> hive> select * from parthp;=0A= >> it results=0A= >>=0A= >> hive> select * from parthp;=0A= >> OK=0A= >> NULL NULL NULL NULL=0A= >> NULL NULL NULL NULL=0A= >> Time taken: 0.056 seconds=0A= >>=0A= >> why is it showing null, I have used the same data types as were in MySql,= =0A= >>=0A= >> (no INT(11) --> no INT, name VARCHAR(45) ---> name STRING , result=0A= >> VARCHAR(45) ----> result STRING , class INT(11) ---> class INT)=0A= >>=0A= >> Please suggest and help=0A= >>=0A= >> Thanks & Regards=0A= >> Yogesh Kumar=0A= >>=0A= >>=0A= >>=0A= >> Please do not print this email unless it is absolutely necessary.=0A= >>=0A= >> The information contained in this electronic message and any attachments= to=0A= >> this message are intended for the exclusive use of the addressee(s) and m= ay=0A= >> contain proprietary, confidential or privileged information. If you are n= ot=0A= >> the intended recipient, you should not disseminate, distribute or copy th= is=0A= >> e-mail. Please notify the sender immediately and destroy all copies of th= is=0A= >> message and any attachments.=0A= >>=0A= >> WARNING: Computer viruses can be transmitted via email. The recipient sho= uld=0A= >> check this email and any attachments for the presence of viruses. The=0A= >> company accepts no liability for any damage caused by any virus transmitt= ed=0A= >> by this email.=0A= >>=0A= >> www.wipro.com=0A= >=0A= > Please do not print this email unless it is absolutely necessary.=0A= >=0A= > The information contained in this electronic message and any attachments t= o this message are intended for the exclusive use of the addressee(s) and ma= y contain proprietary, confidential or privileged information. If you are no= t the intended recipient, you should not disseminate, distribute or copy thi= s e-mail. Please notify the sender immediately and destroy all copies of thi= s message and any attachments.=0A= >=0A= > WARNING: Computer viruses can be transmitted via email. The recipient shou= ld check this email and any attachments for the presence of viruses. The com= pany accepts no liability for any damage caused by any virus transmitted by= this email.=0A= >=0A= > www.wipro.com=0A= Please do not print this email unless it is absolutely necessary. =0A= =0A= 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. =0A= =0A= WARNING: Computer viruses can be transmitted via email. The recipient should= check this email and any attachments for the presence of viruses. The compa= ny accepts no liability for any damage caused by any virus transmitted by th= is email. =0A= =0A= www.wipro.com