RE: simple insert query question

2014-06-20 Thread Jamie Thomson - Contractor
“create a dummy table and then write insert into table select from table2 kind of dummy query” I’ve not been using Hadoop for too long but I was kinda surprised that there was no equivalent of Oracle’s [DUAL] table in Hive. It would be useful for testing expressions in the SELECT clause or

Re: mismatched input 'EOF' expecting FROM near 'CURRENT_TIME' in from clause

2014-06-20 Thread Lefty Leverenz
The Hive wiki describes the SELECT syntax here https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select#LanguageManualSelect-SelectSyntax . -- Lefty On Thu, Jun 19, 2014 at 9:52 AM, Nitin Pawar nitinpawar...@gmail.com wrote: Please take a look at hive's query language support.

Re: hive variables

2014-06-20 Thread Nitin Pawar
hive variables are not replaced on mapreduce jobs but when the query is constructed with the variable. if you are running two difference hivesessions, the variables will not be mixed. If you are setting variables with same name in same hive session then the last set value will be picked On

Upgrading Hive with schematool: ERROR: hive.metastore.HiveMetaException: Failed to get schema version.

2014-06-20 Thread Clay McDonald
Any clue for resolving this? [root@dc-bigdata7 bin]# /usr/lib/hive/bin/schematool -dbType mysql -upgradeSchemaFrom 0.12.0 14/06/20 10:50:25 INFO Configuration.deprecation: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces 14/06/20 10:50:25 INFO Configuration.deprecation:

How to load json data with nested arrays into hive?

2014-06-20 Thread Christian Link
Hi, I'm very, very new to Hadoop, Hive, etc. and I have to import data into hive tables. Environment: Amazon EMR, S3, etc. The input file is on S3 and I copied it into my HDFS: hadoop distcp s3n://mdmp-api-dump/1403181319.json hdfs:///input-api *Example:*

Re: How to load json data with nested arrays into hive?

2014-06-20 Thread Douglas Moore
Hi Chris, Try this Serde https://github.com/rcongiu/Hive-JSON-Serde, I looked at 6 of them a while back and this one was the best, including dealing with nested JSON structures: https://github.com/rcongiu/Hive-JSON-Serde - Douglas

Re: How to load json data with nested arrays into hive?

2014-06-20 Thread Christian Link
Hey Douglas, thanks a lot. That's what I've tried - but it didn't work for me. I've created table with ROW FORMAT one of the SerDe and an array which looked like the array in the json file. I've also added the jar to my hive session with ADD JAR... Loading data into that table with the array