|
|
-
Any column search in HIVE
Garg, Rinku 2012-04-19, 12:18
Hi All,
We did a successful setup of hadoop-0.20.203.0 and hive-0.7.1. We also loaded a large number of CSV files into HDFS successfully. We can query through hive CLI.
Now we want to search for an keyword in any of the columns of a particular table. Any link/thread will be helpful.
Thanks & Regards, Rinku Garg
_____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
+
Garg, Rinku 2012-04-19, 12:18
-
Re: Any column search in HIVE
shashwat shriparv 2012-04-19, 17:24
Check out these links : http://stackoverflow.com/questions/2763112/opening-lucene-index-stored-in-hdfshttp://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5575646&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D5575646http://www.drdobbs.com/article/print?articleID=226300241On Thu, Apr 19, 2012 at 5:48 PM, Garg, Rinku <[EMAIL PROTECTED]>wrote: > Hi All,**** > > ** ** > > We did a successful setup of hadoop-0.20.203.0 and hive-0.7.1. We also > loaded a large number of CSV files into HDFS successfully. We can query > through hive CLI.**** > > ** ** > > Now we want to search for an keyword in any of the columns of a particular > table. Any link/thread will be helpful.**** > > ** ** > > Thanks & Regards,**** > > *Rinku Garg***** > _____________ > The information contained in this message is proprietary and/or > confidential. If you are not the intended recipient, please: (i) delete the > message and all copies; (ii) do not disclose, distribute or use the message > in any manner; and (iii) notify the sender immediately. In addition, please > be aware that any message addressed to our domain is subject to archiving > and review by persons other than the intended recipient. Thank you. > -- ∞ Shashwat Shriparv
+
shashwat shriparv 2012-04-19, 17:24
-
RE: Any column search in HIVE
Garg, Rinku 2012-04-30, 05:58
Hi All, We did a successful setup of hadoop-0.20.203.0 and hive-0.7.1. We also loaded a large number of CSV files into HDFS successfully. We can query through hive CLI. Now we want to store the hive query output result to an CSV file. Any help is appreciated. Thanks Rinku Garg
_____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
+
Garg, Rinku 2012-04-30, 05:58
-
Re: Any column search in HIVE
Nitin Pawar 2012-04-30, 06:48
you can write your query in a file
then execute the query like hive -f hive.hql > some_output_file
Thanks, Nitin
On Mon, Apr 30, 2012 at 11:28 AM, Garg, Rinku <[EMAIL PROTECTED]>wrote:
> Hi All,**** > > We did a successful setup of hadoop-0.20.203.0 and hive-0.7.1. We also > loaded a large number of CSV files into HDFS successfully. We can query > through hive CLI. Now we want to store the hive query output result to an > CSV file.**** > > Any help is appreciated.**** > > Thanks**** > > Rinku Garg**** > _____________ > The information contained in this message is proprietary and/or > confidential. If you are not the intended recipient, please: (i) delete the > message and all copies; (ii) do not disclose, distribute or use the message > in any manner; and (iii) notify the sender immediately. In addition, please > be aware that any message addressed to our domain is subject to archiving > and review by persons other than the intended recipient. Thank you. >
-- Nitin Pawar
+
Nitin Pawar 2012-04-30, 06:48
-
RE: Any column search in HIVE
Garg, Rinku 2012-04-30, 07:20
Hi Nitin,
Thanks for the quick reply. I executed the below mentioned query, it creates the CSV file successfully but data of different columns in a row is not comma separated.
How can we achieve this. Thanks & Regards, Rinku Garg
From: Nitin Pawar [mailto:[EMAIL PROTECTED]] Sent: 30 April 2012 12:18 To: [EMAIL PROTECTED] Subject: Re: Any column search in HIVE
you can write your query in a file
then execute the query like hive -f hive.hql > some_output_file
Thanks, Nitin
On Mon, Apr 30, 2012 at 11:28 AM, Garg, Rinku <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: Hi All, We did a successful setup of hadoop-0.20.203.0 and hive-0.7.1. We also loaded a large number of CSV files into HDFS successfully. We can query through hive CLI. Now we want to store the hive query output result to an CSV file. Any help is appreciated. Thanks Rinku Garg _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
-- Nitin Pawar
_____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
+
Garg, Rinku 2012-04-30, 07:20
-
Re: Any column search in HIVE
Ashwanth Kumar 2012-04-30, 08:43
Try this option - In order to achieve that, create the table with ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' Now create any data you insert into that TABLE is stored internally as CSV.
Do a $ hadoop dfs -cat /path/to/table/part-* > frequired_file.csv
It might be simpler for you to start off with, else you can use linux sed command to replace the field separation value with , in the file that you have at hand.
On Mon, Apr 30, 2012 at 12:50 PM, Garg, Rinku <[EMAIL PROTECTED]>wrote:
> Hi Nitin,**** > > ** ** > > Thanks for the quick reply. I executed the below mentioned query, it > creates the CSV file successfully but data of different columns in a row > is not comma separated.**** > > ** ** > > How can we achieve this.**** > > ** ** > > ** ** > > Thanks & Regards,**** > > *Rinku Garg* > > **** > > *From:* Nitin Pawar [mailto:[EMAIL PROTECTED]] > *Sent:* 30 April 2012 12:18 > *To:* [EMAIL PROTECTED] > *Subject:* Re: Any column search in HIVE**** > > ** ** > > you can write your query in a file **** > > ** ** > > then execute the query like hive -f hive.hql > some_output_file **** > > ** ** > > Thanks,**** > > Nitin**** > > ** ** > > On Mon, Apr 30, 2012 at 11:28 AM, Garg, Rinku <[EMAIL PROTECTED]> > wrote:**** > > Hi All,**** > > We did a successful setup of hadoop-0.20.203.0 and hive-0.7.1. We also > loaded a large number of CSV files into HDFS successfully. We can query > through hive CLI. Now we want to store the hive query output result to an > CSV file.**** > > Any help is appreciated.**** > > Thanks**** > > Rinku Garg**** > > _____________ > The information contained in this message is proprietary and/or > confidential. If you are not the intended recipient, please: (i) delete the > message and all copies; (ii) do not disclose, distribute or use the message > in any manner; and (iii) notify the sender immediately. In addition, please > be aware that any message addressed to our domain is subject to archiving > and review by persons other than the intended recipient. Thank you.**** > > > > **** > > ** ** > > -- > Nitin Pawar**** > _____________ > The information contained in this message is proprietary and/or > confidential. If you are not the intended recipient, please: (i) delete the > message and all copies; (ii) do not disclose, distribute or use the message > in any manner; and (iii) notify the sender immediately. In addition, please > be aware that any message addressed to our domain is subject to archiving > and review by persons other than the intended recipient. Thank you. >
--
Ashwanth Kumar / ashwanthkumar.in
+
Ashwanth Kumar 2012-04-30, 08:43
-
Re: Any column search in HIVE
Nitin Pawar 2012-04-30, 10:01
or if you want the query output directly in csv format as Vinod said,
you can do
select concat(column1,","), concat(column2,",") from table On Mon, Apr 30, 2012 at 2:13 PM, Ashwanth Kumar < [EMAIL PROTECTED]> wrote:
> Try this option - In order to achieve that, create the table with ROW > FORMAT DELIMITED FIELDS TERMINATED BY ',' Now create any data you insert > into that TABLE is stored internally as CSV. > > Do a $ hadoop dfs -cat /path/to/table/part-* > frequired_file.csv > > It might be simpler for you to start off with, else you can use linux sed > command to replace the field separation value with , in the file that you > have at hand. > > On Mon, Apr 30, 2012 at 12:50 PM, Garg, Rinku <[EMAIL PROTECTED]>wrote: > >> Hi Nitin,**** >> >> ** ** >> >> Thanks for the quick reply. I executed the below mentioned query, it >> creates the CSV file successfully but data of different columns in a row >> is not comma separated.**** >> >> ** ** >> >> How can we achieve this.**** >> >> ** ** >> >> ** ** >> >> Thanks & Regards,**** >> >> *Rinku Garg* >> >> **** >> >> *From:* Nitin Pawar [mailto:[EMAIL PROTECTED]] >> *Sent:* 30 April 2012 12:18 >> *To:* [EMAIL PROTECTED] >> *Subject:* Re: Any column search in HIVE**** >> >> ** ** >> >> you can write your query in a file **** >> >> ** ** >> >> then execute the query like hive -f hive.hql > some_output_file **** >> >> ** ** >> >> Thanks,**** >> >> Nitin**** >> >> ** ** >> >> On Mon, Apr 30, 2012 at 11:28 AM, Garg, Rinku <[EMAIL PROTECTED]> >> wrote:**** >> >> Hi All,**** >> >> We did a successful setup of hadoop-0.20.203.0 and hive-0.7.1. We also >> loaded a large number of CSV files into HDFS successfully. We can query >> through hive CLI. Now we want to store the hive query output result to an >> CSV file.**** >> >> Any help is appreciated.**** >> >> Thanks**** >> >> Rinku Garg**** >> >> _____________ >> The information contained in this message is proprietary and/or >> confidential. If you are not the intended recipient, please: (i) delete the >> message and all copies; (ii) do not disclose, distribute or use the message >> in any manner; and (iii) notify the sender immediately. In addition, please >> be aware that any message addressed to our domain is subject to archiving >> and review by persons other than the intended recipient. Thank you.**** >> >> >> >> **** >> >> ** ** >> >> -- >> Nitin Pawar**** >> _____________ >> The information contained in this message is proprietary and/or >> confidential. If you are not the intended recipient, please: (i) delete the >> message and all copies; (ii) do not disclose, distribute or use the message >> in any manner; and (iii) notify the sender immediately. In addition, please >> be aware that any message addressed to our domain is subject to archiving >> and review by persons other than the intended recipient. Thank you. >> > > > > -- > > Ashwanth Kumar / ashwanthkumar.in > > > -- Nitin Pawar
+
Nitin Pawar 2012-04-30, 10:01
-
Re: Any column search in HIVE
Vinod Singh 2012-04-30, 06:49
Also look at INSERT OVERWRITE LOCAL DIRECTORY feature with usage of concat function to create CSV output.
Thanks, Vinod
On Mon, Apr 30, 2012 at 12:18 PM, Nitin Pawar <[EMAIL PROTECTED]>wrote:
> you can write your query in a file > > then execute the query like hive -f hive.hql > some_output_file > > Thanks, > Nitin > > On Mon, Apr 30, 2012 at 11:28 AM, Garg, Rinku <[EMAIL PROTECTED]>wrote: > >> Hi All,**** >> >> We did a successful setup of hadoop-0.20.203.0 and hive-0.7.1. We also >> loaded a large number of CSV files into HDFS successfully. We can query >> through hive CLI. Now we want to store the hive query output result to an >> CSV file.**** >> >> Any help is appreciated.**** >> >> Thanks**** >> >> Rinku Garg**** >> _____________ >> The information contained in this message is proprietary and/or >> confidential. If you are not the intended recipient, please: (i) delete the >> message and all copies; (ii) do not disclose, distribute or use the message >> in any manner; and (iii) notify the sender immediately. In addition, please >> be aware that any message addressed to our domain is subject to archiving >> and review by persons other than the intended recipient. Thank you. >> > > > > -- > Nitin Pawar > >
+
Vinod Singh 2012-04-30, 06:49
|
|