Re: Quering RDBMS table in a Hive query

2012-06-18 Thread Ruslan Al-Fakikh
ms you can place these steps in order in a shell script and just > execute the script. > > > Regards > Bejoy KS > > Sent from handheld, please excuse typos. > > -Original Message- > From: Ruslan Al-Fakikh > Date: Sat, 16 Jun 2012 04:40:36 > To: > R

Re: Quering RDBMS table in a Hive query

2012-06-15 Thread Bejoy KS
order in a shell script and just execute the script. Regards Bejoy KS Sent from handheld, please excuse typos. -Original Message- From: Ruslan Al-Fakikh Date: Sat, 16 Jun 2012 04:40:36 To: Reply-To: user@hive.apache.org Subject: Re: Quering RDBMS table in a Hive query Hi Esteban

Re: Quering RDBMS table in a Hive query

2012-06-15 Thread Ruslan Al-Fakikh
Hi Esteban, Your solution is what I am trying to avoid, having to keep the hdfs data up-to-date. I know I can easily schedule a dependency between the Sqoop import job and the hive query job and currently we have a scheduling tool (opswise) for such things. But what if I just want to run an ad hoc

Re: Quering RDBMS table in a Hive query

2012-06-15 Thread Esteban Gutierrez
Hi Ruslan, Jan's approach sounds like a good workaround only if you can use the output in a mapjoin, but I don't think it will scale nicely if you have a very large number of tasks since that will translate as DB connections to MySQL. I think a more scalable and reliable way is just to schedule

Re: Quering RDBMS table in a Hive query

2012-06-15 Thread Ruslan Al-Fakikh
Thanks Jan On Fri, Jun 15, 2012 at 4:35 PM, Jan Dolinár wrote: > On 6/15/12, Ruslan Al-Fakikh wrote: >> I didn't know InputFormat and LineReader could help, though I didn't >> look at them closely. I was thinking about implementing a >> Table-Generating Function (UDTF) if there is no an already

Re: Quering RDBMS table in a Hive query

2012-06-15 Thread Jan Dolinár
On 6/15/12, Ruslan Al-Fakikh wrote: > I didn't know InputFormat and LineReader could help, though I didn't > look at them closely. I was thinking about implementing a > Table-Generating Function (UDTF) if there is no an already implemented > solution. Both is possible, InputFormat and/or UD(T)F.

Re: Quering RDBMS table in a Hive query

2012-06-15 Thread Ruslan Al-Fakikh
Thanks Jan, I didn't know InputFormat and LineReader could help, though I didn't look at them closely. I was thinking about implementing a Table-Generating Function (UDTF) if there is no an already implemented solution. Ruslan On Thu, Jun 14, 2012 at 10:03 AM, Jan Dolinár wrote: > Hi Ruslan, >

Re: Quering RDBMS table in a Hive query

2012-06-13 Thread Jan Dolinár
Hi Ruslan, I've been in similar situation and solved it by writing a custom InputFormat and LineReader that loads the data from MySQL in constructor. In my case I use it just to check value ranges and similar stuff. If you want to join the data with whats in your hdfs files, you can do that as wel