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 -- https://cwiki.apache.org/confluence/d

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 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 when I issued *s

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 Map I can query the table just fine now. Here is the complete DDL for reference: create external table

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 wrot

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 wrote: > Looks like you use MySQL. > > Can you check if your MySQL still up ? > > and permissions on your hive metastore db ? > > Sent from my i

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 wrote: > It actually seems to be ignoring hive-site.xml. No effect of the properties > set in hive-site.xml file. > >

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 wrote: > It looks OK to me, > > > > > javax.jdo.option.ConnectionURL > jdbc:mysql://localhost

Re: "show table" throwing strange error

2013-06-19 Thread Mohammad Tariq
It looks OK to me, javax.jdo.option.ConnectionURL jdbc:mysql://localhost:3306/hive?*createDatabaseIfNotExist*=true javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver javax.jdo.option.ConnectionUserName apache javax.jdo.option.ConnectionPassword password h

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 wrote: > Hello Anurag, > >Thank you for the quick response. Log files is full of such lines along > with a trace that says it i

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 1:7

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 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

"show table" throwing strange error

2013-06-19 Thread Mohammad Tariq
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 when I issued *show tables*I got some strange error on the CLI. Here is the error : hive> show tables; FAILED: Parse Error: line 1:0 character '' not supported he

Re: New to hive.

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

Re: New to hive.

2013-06-19 Thread Shaun Clowes
I'd recommend taking a look at Hadoop, The Definitive Guide. It's a good book and will explain what you're looking for. Cheers, Shaun On 20 June 2013 08:54, Bharati wrote: > Hi Folks, > > I am new to hive and need information, tutorials etc that you can point > to. I have installed hive to wor

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 qu

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 int[])

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 wrote: > 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 statement, > or copy a

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 wrote: > try_parsed_json is not trivial imho :) > > start with the very, very basic, for example, { "jobs" : "foo" }. Get > that to work first

INSERT non-static data to array?

2013-06-19 Thread Michael Malak
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 statement, or copy an entire array verbatim from another table?  I.e. I'm assuming that a) SQL1999 array INSERT via subquery is not (yet) implemented in Hive

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

Re: Hive select shows null after successful data load

2013-06-19 Thread Sunita Arvind
Thanks for looking into it Ramki. Yes I had tried these options. Here is what I get (renamed the table to have a meaningful name): hive> select jobs.values[1].id from linkedinjobsearch; ..mapreduce task details OK NULL Time taken: 9.586 seconds hive> select jobs.values[0].position.title

Re: Hive select shows null after successful data load

2013-06-19 Thread Ramki Palle
Can you run some other queries from job1 table and see if any query returns some data? I am guessing your query "select jobs.values.position.title from jobs1;" may have some issue. May be it should be as select jobs.values[0].position.title from jobs1; Regards, Ramki. On Wed, Jun 19, 2013 at

Re: Hive select shows null after successful data load

2013-06-19 Thread Sunita Arvind
Thanks Stephen, That's just what I tried with the try_parsed table. It is exactly same data with lesser nesting in the structure and lesser number of entries. Do you mean to say that highly nested jsons can lead to issues? What are typical solution to such issues? Write UDFs in hive or parse the J

RE: How to change the separator of INSERT OVERWRITE LOCAL DIRECTORY

2013-06-19 Thread Tony Burton
Works for me like this, using the most recent Hive on AWS, using a ~ delimiter: > create external table mydata () row format delimited fields terminated by '~' stored as textfile location 's3://mybucket/path/to/data'; > insert overwrite table mydata select * from otherdata; From: Felix.徐 [mai

Re: Hive select shows null after successful data load

2013-06-19 Thread Stephen Sprague
I think you might have to start small here instead of going for the home run on the first swing. when all else fails start with a trivial json object and then build up from there and see what additional step breaks it. that way you know if the trivial example fails is something fundamental and n

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 wrote: > Do you have any t

Re: Export hive table format issue

2013-06-19 Thread Hamza Asad
Thnx alot Nitin and all, Thats the root cause. Field separator was default i.e ^A and the above issue u have mentioned. Thnx again :) Stay Blessed On Wed, Jun 19, 2013 at 10:21 AM, Nitin Pawar wrote: > Jarek, > > Any chances that Hamza is hitting this one SQOOP-188: Problem with NULL > values in