Execute query file

2012-04-17 Thread Chandan B.K
Hi,

Scenario: I have started my Hadoop processes (dfs and mapred).  I have also
started by Hive thrift server using the command:
$bin/hive --service hiveserver.

I want to execute a query file {nothing but a text file with a list of
queries separated by new line character} through my JDBC application. How
do I do it?

Note: I am aware that through the command line, i can run this statement to
execute the queries in the query file:
$bin/hive -e /path/to/query/file
I am not looking for this one


Thanks.
-- 

-Regards
Chandan.B.K.,


==
Cell: +91-9902382263
Alt Email: bkchandan...@yahoo.com


How to call Shell Script from Hive JDBC

2012-04-17 Thread Bhavesh Shah
Hi all,

I have implemented a task in Hive.

But I need to call a Shell Script in which I have written SQOOP commands
for importing the tables in Hive from SQL Server.

I tried to call a Shell Script in one of the Demo Application but as the
Program runs no action taken place. I just see the blank console and a
message which I have printed.

Is it possible to call the Shell Script for importing and exporting the
tables in HIve?

Do I need to do something extra in case of Hive? Please help me out from
this.

Thanks.


-- 
Regards,
Bhavesh Shah


Help with INTEGER on HBase (Hive-1634)

2012-04-17 Thread Tim Robertson
Hi all,

I am *really* interested in Hive-1634 (
https://issues.apache.org/jira/browse/HIVE-1634).  I have just built from
Hive trunk using HBase 0.90.4 as the version (e.g. we run cdh3u2).

We have an HBase table populated with Bytes, so I create the Hive table
like so:

CREATE EXTERNAL TABLE tim_hbase_occurrence (
  id int,
  scientific_name string,
  data_resource_id int
) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH
SERDEPROPERTIES (
  hbase.columns.mapping = :key,v:scientific_name,v:data_resource_id,
  hbase.columns.storage.types = b,b,b
) TBLPROPERTIES(
  hbase.table.name = mini_occurrences,
  hbase.table.default.storage.type = binary
);

This suggests it understands the formats:

hive SELECT * FROM tim_hbase_occurrence LIMIT 3;
OK
1444 Abies alba 1081
1445 Abies alba 1081
1446 Abies alba 1081

But doing any queries, suggest not:

hive SELECT * FROM tim_hbase_occurrence WHERE scientific_name='Abies alba'
limit 3;
...
NULL Abies alba NULL
NULL Abies alba NULL
NULL Abies alba NULL
Time taken: 9.668 seconds

hive SELECT * FROM tim_hbase_occurrence WHERE data_resource_id=1081;
...
0 (no records)

Can anyone provide any guidance on this please?

Thanks!
Tim


Re: Case Studies for 'Programming Hive' book from O'Reilly

2012-04-17 Thread Mattmann, Chris A (388J)
Hi Jason,

I'd be happy to discuss in your O'Reilly book our case study using 
HIVE for Regional Climate Modeling.

Let me know how to proceed.

Thank you!

Cheers,
Chris

On Apr 11, 2012, at 10:48 AM, Jason Rutherglen wrote:

 Dear Hive User,
 
 We want your interesting case study for our upcoming book titled
 'Programming Hive' from O'Reilly.
 
 How you use Hive, either high level or low level code details are both
 encouraged!
 
 Feel free to reach out with a brief abstract.
 
 Regards,
 
 Jason Rutherglen


++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattm...@nasa.gov
WWW:   http://sunset.usc.edu/~mattmann/
++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++



Creating Hbase table with pre-splitted regions using Hive QL

2012-04-17 Thread Narayanan K
Hi,

I wanted to create an HBase table with pre-split regions in the beginning
using HBase-Hive Integration.

I have read https://cwiki.apache.org/Hive/hbaseintegration.html and I
wanted to know *what is the syntax for creating Hbase table with pre-split
regions using Hive syntax from Hive.*

Thanks,
Narayanan


Re: Creating Hbase table with pre-splitted regions using Hive QL

2012-04-17 Thread Sukhendu Chakraborty
Does HIVE support SQL 99 'WITH' clause yet? I dod not find  definitive
answer in the web. I am in thr process of installing HIVE locally, but
wanted to check with you before trying it.

Thanks,
-Sukhendu


WITH clause support in HIVE

2012-04-17 Thread Sukhendu Chakraborty
Resending, as I forgot to change the subject line in my last post. Pls
respond to this email.

Does HIVE support SQL 99 'WITH' clause yet? I dod not find  definitive
answer in the web. I am in thr process of installing HIVE locally, but
wanted to check with you before trying it.

Thanks,
-Sukhendu


Hive can't find some tables

2012-04-17 Thread Đỗ Hoàng Khiêm
HI, I have some problems with Hive, looks like Hive cannot read some of my
tables which was imported before by Sqoop. After importing from Sqoop it's
still able to read/query from these tables, but after I restarted machine,
Hive cannot find these tables anymore (as *show tables* didn't list these
tables) while it's still able to create new tables. I have checked in HDFS,
these table files still existed at /user/hive/warehouse/.

When start hive shell then try to show tables, the hive log printed out:

2012-04-18 10:25:11,412 WARN  conf.HiveConf (HiveConf.java:clinit(68)) -
hive-site.xml not found on CLASSPATH
2012-04-18 10:25:43,239 ERROR DataNucleus.Plugin
(Log4JLogger.java:error(115)) - Bundle org.eclipse.jdt.core requires
org.eclipse.core.resources but it cannot be resolved.
2012-04-18 10:25:43,239 ERROR DataNucleus.Plugin
(Log4JLogger.java:error(115)) - Bundle org.eclipse.jdt.core requires
org.eclipse.core.resources but it cannot be resolved.
2012-04-18 10:25:43,240 ERROR DataNucleus.Plugin
(Log4JLogger.java:error(115)) - Bundle org.eclipse.jdt.core requires
org.eclipse.core.runtime but it cannot be resolved.
2012-04-18 10:25:43,240 ERROR DataNucleus.Plugin
(Log4JLogger.java:error(115)) - Bundle org.eclipse.jdt.core requires
org.eclipse.core.runtime but it cannot be resolved.
2012-04-18 10:25:43,240 ERROR DataNucleus.Plugin
(Log4JLogger.java:error(115)) - Bundle org.eclipse.jdt.core requires
org.eclipse.text but it cannot be resolved.
2012-04-18 10:25:43,240 ERROR DataNucleus.Plugin
(Log4JLogger.java:error(115)) - Bundle org.eclipse.jdt.core requires
org.eclipse.text but it cannot be resolved.

How can I recover these table?

Thanks.


Re: WITH clause support in HIVE

2012-04-17 Thread Sukhendu Chakraborty
We are looking to build an abstraction layer on top of hive where
objects store Hive queries. These queries gets executed when those
objects are accessed by the user. There can be derived obects, for eg.
y = op(x), where y is another Hive query built on top of the  query
represented by x depending on the operator 'op'.

We thought of using WITH clause to achieve these extensions easily.
However, since Hive does not support WITH clause yet, we will look
into the options you suggested.

Thanks,
-Sukhendu

On Tue, Apr 17, 2012 at 11:46 AM, Mark Grover mgro...@oanda.com wrote:
 Sukhendu,
 Perhaps you can use a view or derived table to accomplish the same.

 What's  your use case?

 Mark Grover, Business Intelligence Analyst
 OANDA Corporation

 www: oanda.com www: fxtrade.com
 e: mgro...@oanda.com

 Best Trading Platform - World Finance's Forex Awards 2009.
 The One to Watch - Treasury Today's Adam Smith Awards 2009.


 - Original Message -
 From: Sukhendu Chakraborty sukhendu.chakrabo...@gmail.com
 To: user@hive.apache.org
 Sent: Tuesday, April 17, 2012 2:23:33 PM
 Subject: Re: WITH clause support in HIVE

 Never mind. Its not implemented yet:
 https://issues.apache.org/jira/browse/HIVE-1180

 On Tue, Apr 17, 2012 at 11:02 AM, Sukhendu Chakraborty
 sukhendu.chakrabo...@gmail.com wrote:
 Resending, as I forgot to change the subject line in my last post. Pls
 respond to this email.

 Does HIVE support SQL 99 'WITH' clause yet? I dod not find  definitive
 answer in the web. I am in thr process of installing HIVE locally, but
 wanted to check with you before trying it.

 Thanks,
 -Sukhendu