Re: Hive select shows null after successful data load

2013-06-19 Thread Richa Sharma
Do you have any timestamp fields in the table that might contain null value ? I faced a similar situation sometime back - changing the data type to string made it work. But I was working on delimited text files. Not sure if it applies to JSON .. but its still worth giving a try !! Richa On

Re: Hive select shows null after successful data load

2013-06-19 Thread Sunita Arvind
Thanks for sharing your experience Richa. I do have timestamps but in the format of year : INT, day : INT, month : INT. As per your suggestion, I changed them all to string, but still get null as the output. regards Sunita On Wed, Jun 19, 2013 at 2:17 AM, Richa Sharma

Re: Hive select shows null after successful data load

2013-06-19 Thread Stephen Sprague
try_parsed_json is not trivial imho :) start with the very, very basic, for example, { jobs : foo }. Get that to work first. :) When that works add a level of nesting and see what happens. Keep building on it until you either break it (and then you know that last thing you added broke it and

Re: Hive select shows null after successful data load

2013-06-19 Thread Sunita Arvind
Thanks Stephen, Let me explore options. I will let you all know once I am successful. regards Sunita On Wed, Jun 19, 2013 at 3:08 PM, Stephen Sprague sprag...@gmail.com wrote: try_parsed_json is not trivial imho :) start with the very, very basic, for example, { jobs : foo }. Get that to

Re: INSERT non-static data to array?

2013-06-19 Thread Edward Capriolo
: https://issues.apache.org/jira/browse/HIVE-3238 This might fit the bill. On Wed, Jun 19, 2013 at 3:23 PM, Michael Malak michaelma...@yahoo.comwrote: Is the only way to INSERT data into a column of type array to load data from a pre-existing file, to use hard-coded values in the INSERT

Re: INSERT non-static data to array?

2013-06-19 Thread Michael Malak
The example code for inline_table() there has static data.  It's not possible to use a subquery inside the inline_table() or array() is it? The SQL1999 way is described here: http://www.postgresql.org/message-id/20041028232152.ga76...@winnie.fuhr.org CREATE TABLE table_a(a int, b int, c

New to hive.

2013-06-19 Thread Bharati
Hi Folks, I am new to hive and need information, tutorials etc that you can point to. I have installed hive to work with MySQL. I can run queries. Now I would like to understand how the map and reduce classes are created and how I can look at the data for the map job and map class the hive

Re: New to hive.

2013-06-19 Thread Mohammad Tariq
Hello ma'am, Hive queries are parsed using ANTLR http://www.antlr.org/ and and are converted into corresponding MR jobs(actually a lot of things happen under the hood). I had answered a similar

Re: show table throwing strange error

2013-06-19 Thread Anurag Tangri
Did you check in your hive query log under /tmp to see if it says something in the log ? Sent from my iPhone On Jun 19, 2013, at 5:53 PM, Mohammad Tariq donta...@gmail.com wrote: Hello list, I have a hive(0.9.0) setup on my Ubuntu box running hadoop-1.0.4. Everything was going

Re: show table throwing strange error

2013-06-19 Thread Mohammad Tariq
Hello Anurag, Thank you for the quick response. Log files is full of such lines along with a trace that says it is some parsing related issue. But the strange thing is that here I can see *'\00' *but on the CLI it was just *' '. *I am wondering what's with wrong with *show tables;* * * line

Re: show table throwing strange error

2013-06-19 Thread Mapred Learn
Can you also check your hive site XML ? Is it properly formatted and connection strings correct ? Sent from my iPhone On Jun 19, 2013, at 6:30 PM, Mohammad Tariq donta...@gmail.com wrote: Hello Anurag, Thank you for the quick response. Log files is full of such lines along with a trace

Re: show table throwing strange error

2013-06-19 Thread Mohammad Tariq
It looks OK to me, configuration property namejavax.jdo.option.ConnectionURL/name valuejdbc:mysql://localhost:3306/hive?*createDatabaseIfNotExist*=true /value /property property namejavax.jdo.option.ConnectionDriverName/name valuecom.mysql.jdbc.Driver/value /property property

Re: show table throwing strange error

2013-06-19 Thread Mohammad Tariq
It actually seems to be ignoring hive-site.xml. No effect of the properties set in hive-site.xml file. Warm Regards, Tariq cloudfront.blogspot.com On Thu, Jun 20, 2013 at 7:12 AM, Mohammad Tariq donta...@gmail.com wrote: It looks OK to me, configuration property

Re: show table throwing strange error

2013-06-19 Thread Anurag Tangri
Looks like you use MySQL. Can you check if your MySQL still up ? and permissions on your hive metastore db ? Sent from my iPhone On Jun 19, 2013, at 6:44 PM, Mohammad Tariq donta...@gmail.com wrote: It actually seems to be ignoring hive-site.xml. No effect of the properties set in

Re: show table throwing strange error

2013-06-19 Thread Mohammad Tariq
Yes. It's up and running with all the required permissions. Warm Regards, Tariq cloudfront.blogspot.com On Thu, Jun 20, 2013 at 7:21 AM, Anurag Tangri tangri.anu...@gmail.comwrote: Looks like you use MySQL. Can you check if your MySQL still up ? and permissions on your hive metastore db ?

Re: show table throwing strange error

2013-06-19 Thread Mohammad Tariq
That error is gone after I recreated hive-site.xml and restarted hive. But now there seems to be some problem with metastore settings. It's not going to mysql. Anyways, thank you both for the help. Warm Regards, Tariq cloudfront.blogspot.com On Thu, Jun 20, 2013 at 7:29 AM, Mohammad Tariq

Re: Hive select shows null after successful data load

2013-06-19 Thread Sunita Arvind
Finally I could get it work. The issue resolves once I remove the arrays within position structure. So that is the limitation of the serde. I changed 'industries' to string and 'jobfunctions' to Mapstring,string I can query the table just fine now. Here is the complete DDL for reference: create

Re: show table throwing strange error

2013-06-19 Thread Sunita Arvind
Your issue seems familiar. Try logging out of hive session and re-login. Sunita On Wed, Jun 19, 2013 at 8:53 PM, Mohammad Tariq donta...@gmail.com wrote: Hello list, I have a hive(0.9.0) setup on my Ubuntu box running hadoop-1.0.4. Everything was going smooth till now. But today

Re: New to hive.

2013-06-19 Thread Lefty Leverenz
Programming Hive and Hadoop: The Definitive Guide are available at the O'Reilly website (http://oreilly.com/) and on Amazon. But don't forget the Hive wiki: - Hive Home -- https://cwiki.apache.org/confluence/display/Hive/Home - Getting Started --