Re: External table

2014-09-04 Thread Vinod Singh
Yes Thanks, Vinod 04-09-2014 6:30 am को, "CHEBARO Abdallah" ने लिखा: > Hello, > > > > Is it possible to create an external table and point it to a file instead > of a directory? > > > > thanks > > *** > > This e-mail contains information for the intended recipient on

Re: Multiple Join giving different results compared to separate joins using intermediate table

2012-08-18 Thread Vinod Singh
You may have to rewrite the query as- select <> from (select <> from A a join B b on (a.shopid=b.shopid and a.shopposition=b.shopposition)) D join C c(c.clientid=a.clientid) That will give results as per your expectation. Thanks, Vinod On Sat, Aug 18, 2012 at 8:20 AM, Himanish Kushary wrote: >

Re: Insert Overwrite Directory fails for multiple nested directory

2012-08-18 Thread Vinod Singh
Hive can create a directory only one level deep. Thanks, Vinod On Sat, Aug 18, 2012 at 1:06 AM, Himanish Kushary wrote: > Hi, > > I am executing the command : insert overwrite directory > '/feed/daily/2011-07-16' select count(1) from distinctpacks; but am getting > the error > > Failed with exce

Re: Hive job fails on hive client even though all map-red stages finish but succeeds on hive server

2012-08-11 Thread Vinod Singh
We run Hive jobs on 20+ TB data without any issues. Thanks, Vinod On Sat, Aug 11, 2012 at 9:07 AM, Anurag Tangri wrote: > Hi, > We are facing this issue where we run a hive job over huge data about ~6 > TB input. > > We run this from hive client and hive metastore server is on another > machine.

Re: question on output hive table to file

2012-08-06 Thread Vinod Singh
> an ugly thing. No shortcut? > > > On Mon, Aug 6, 2012 at 9:50 PM, Vinod Singh wrote: > >> Change the query to something like- >> >> INSERT OVERWRITE DIRECTORY '/outputable.txt' >> select concat(col1, ',', col2, ',', col3) fro

Re: question on output hive table to file

2012-08-06 Thread Vinod Singh
used the following that it won't help? > > ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' > > On Mon, Aug 6, 2012 at 9:43 PM, Vinod Singh wrote: > >> Columns of a Hive table are separated by ^A character. Instead of doing a >> "SELECT * ", yo

Re: question on output hive table to file

2012-08-06 Thread Vinod Singh
Columns of a Hive table are separated by ^A character. Instead of doing a "SELECT * ", you may like to use concat function to have a separator of your choice. Thanks, Vinod On Tue, Aug 7, 2012 at 9:39 AM, zuohua zhang wrote: > I have used the following to output a hive table to a file: > DROP T

Re: Add Yesterday's date at runtime

2012-08-06 Thread Vinod Singh
There is no built-in support for such things in Hive. You may like to explore possibility of doing this via shell script or something else to calculate date dynamically. Thanks, Vinod On Tue, Aug 7, 2012 at 12:09 AM, Techy Teck wrote: > I am running *Hive 0.6 *and below is the content I have in

Re: Find the files which contains a particular String

2012-07-30 Thread Vinod Singh
I believe Hive does not have any feature, which can provide this information. You may like to write a custom Map / Reduce program and get the file name being processed as shown below- ((FileSplit) context.getInputSplit()).getPath() and then emit the file name when an occurrence of the word is fou

Re: Possibility of defining the Output directory programmatically

2012-07-23 Thread Vinod Singh
set file_name= home/user/Desktop > > Then the file_name I am getting is *NOT* home/user/Desktop/foo_bar > But what I am getting is, /home/user/Desktop/concat(foo,bar) > > > > On Mon, Jul 23, 2012 at 3:04 PM, Vinod Singh wrote: > >> We generate variables dynamically

Re: Possibility of defining the Output directory programmatically

2012-07-23 Thread Vinod Singh
ll try to find a way to pass the directory URLs from outside then. > And it would be grateful if you can direct me to any guide or > documentation that describes how to pass values from outside of Hive. > > Thanks > Manisha > > > On Mon, Jul 23, 2012 at 2:08 PM, Vinod Singh wro

Re: Possibility of defining the Output directory programmatically

2012-07-23 Thread Vinod Singh
ove parameter as the file URL > > I tried this way. But the directory name is returned as > > file:/getFilePath( "0" , "testServer" ) > > Does that mean I cannot use UDF to define the local directory name? Or am > I doing anything wrong in here? > > Tha

Re: Possibility of defining the Output directory programmatically

2012-07-23 Thread Vinod Singh
The output path in this query is already parameterized- *INSERT OVERWRITE LOCAL DIRECTORY 'file:///${hiveconf:file_name}'* Though UDF is not going to be invoked here. Thanks, Vinod 2012/7/23 Manisha Gayathri > Hi > > Is there any possibility of defining the output directory of a hive > query

Re: HADOOP_HOME requirement

2012-07-18 Thread Vinod Singh
We are using Hive 0.7.1 and there HADOOP_HOME must be exported so that it is available as environment variable. Thanks, Vinod On Wed, Jul 18, 2012 at 10:48 PM, Nitin Pawar wrote: > from hive trunk i can only see this > I am not sure I am 100% sure but I remember setting up HADOOP_HOME always >

Re: Run simple HiveQL query using shell script?

2012-07-17 Thread Vinod Singh
. > > > > > *Raihan Jamal* > > > > On Tue, Jul 17, 2012 at 11:30 PM, Vinod Singh wrote: > >> hive -e "SELECT count(*) from pds_table" > a.txt >> >> Thanks, >> Vinod >> >> >> On Wed, Jul 18, 2012 at 10:58 AM, Raihan Jam

Re: Run simple HiveQL query using shell script?

2012-07-17 Thread Vinod Singh
hive -e "SELECT count(*) from pds_table" > a.txt Thanks, Vinod On Wed, Jul 18, 2012 at 10:58 AM, Raihan Jamal wrote: > I am new to Unix Shell Scripting world. I wanted to run a simple > *HiveQL*query from the Unix Shell script and output the result in a .txt file > and > then send that .txt f

Re: How to a property in hive query

2012-07-03 Thread Vinod Singh
set property.name=value; Thanks, Vinod On Tue, Jul 3, 2012 at 5:40 AM, Abhishek wrote: > Hi all, > > Can I know, how to override a property of mapred-site.xml in Hive join > query. > Suppose for map reduce job we override using -D , how > to do it with in hive query. > > Regards > Abhishek > >

Re: Is the USE database command hive server-wide or session specific

2012-06-26 Thread Vinod Singh
This is session specific command. Thanks, Vinod http://blog.vinodsingh.com/ On Tue, Jun 26, 2012 at 9:27 PM, Ladda, Anand wrote: > I am connecting to Hive through a client tool via Hive Server. The > client tool tries to set a database context by running the USE [database] > command when it ma

Re: Compressed data storage in HDFS - Error

2012-06-06 Thread Vinod Singh
But it may payoff by saving on network IO while copying the data during reduce phase. Though it will vary from case to case. We had good results by using Snappy codec for compressing map output. Snappy provides reasonably good compression at faster rate. Thanks, Vinod http://blog.vinodsingh.com/

Re: Hive scratch dir not cleaning up

2012-06-01 Thread Vinod Singh
Yes, that is how I do. Though 1 month is too long, I keep it just 2 days. Thanks, Vinod http://blog.vinodsingh.com/ On Fri, Jun 1, 2012 at 2:15 PM, Ruben de Vries wrote: > So I should write a job which cleans up 1 month old results or something > like that? > > From: Vinod Sing

Re: Hive scratch dir not cleaning up

2012-06-01 Thread Vinod Singh
Hive deletes job contents from the scratch directory on completion of the job. Though failed / killed jobs leave data there, which needs to be removed manually. Thanks, Vinod http://blog.vinodsingh.com/ On Fri, Jun 1, 2012 at 1:58 PM, Ruben de Vries wrote: > Hey Hivers, > > ** ** > > I’m al

Re: Can one Hadoop cluster hold multiple Hive instances?

2012-05-13 Thread Vinod Singh
nsated for with multiple > instances versus those? > > Thanks, > Ranjith > > On May 13, 2012, at 3:32 PM, Vinod Singh wrote: > > Yes, security is one of the motivation. As hive is weak on security, > keeping separate warehouses makes the data secure. > > Thanks,

Re: Can one Hadoop cluster hold multiple Hive instances?

2012-05-13 Thread Vinod Singh
bjects. What is the motivation behind having multiple hive instances? I am > curious here...is it for security? > > Thanks, > Ranjith > > On May 13, 2012, at 9:53 AM, Vinod Singh wrote: > > > That if perfectly fine. Even each user can have their own warehouse > direc

Re: Can one Hadoop cluster hold multiple Hive instances?

2012-05-13 Thread Vinod Singh
That if perfectly fine. Even each user can have their own warehouse directory. Thanks, Vinod On Sun, May 13, 2012 at 5:37 PM, Xiaobo Gu wrote: > Hi, > > If we set different hive.metastore.warehouse.dir for the different > Hive instances, it this ok, does them conflict with other resouces, > suc

Re: hive failed execution error return code 2 from org.apache.hadoop.hive.ql.exec.mapredtask

2012-05-11 Thread Vinod Singh
At times Hive error message could be misleading. I face similar error message while running query by embedding Hive in my application. Though actual error message in my case is, which is not propagated properly- FAILED: Error in semantic analysis: Line 3:2 Invalid function abc See if you are doin

Re: Any column search in HIVE

2012-04-29 Thread Vinod Singh
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 wrote: > you can write your query in a file > > then execute the query like hive -f hive.hql > some_output_file > > Thanks, > Niti

Embedding Hive

2012-04-24 Thread Vinod Singh
Hello, I would like to embed Hive (client) in my application to execute a sequence of queries. Right now I do it using CLI (hive -f myScript.sql). Problem with this approach is that I do not get an return / error code to know the status of query programmatically. So my question is what is the bes