Re: Reading 2 table data in MapReduce for Performing Join

2015-03-27 Thread Suraj Nayak
This is solved. Used Writable instead of LongWritable or NullWritable in Mapper input key type. Thanks Suraj Nayak On 19-Mar-2015 9:48 PM, Suraj Nayak snay...@gmail.com wrote: Is this related to https://issues.apache.org/jira/browse/HIVE-4329 ? Is there a workaround? On Thu, Mar 19, 2015 at

Re: 0.14 parse exception, row format question

2015-03-27 Thread Daniel Haviv
Your quotation marks around the location string seem to be wrong Daniel On 26 במרץ 2015, at 22:10, bitsofinfo bitsofinf...@gmail.com wrote: Hi, What is wrong with this query? I am reading the docs and it appears that this should work no? INSERT OVERWRITE DIRECTORY

RE: Understanding Hive's execution plan

2015-03-27 Thread Mich Talebzadeh
Sure Daniel. Apologies. Mich Talebzadeh http://talebzadehmich.wordpress.com Publications due shortly: Creating in-memory Data Grid for Trading Systems with Oracle TimesTen and Coherence Cache NOTE: The information in this email is proprietary and confidential. This message is

Hive optimiser seems not to use for a covered query

2015-03-27 Thread Mich Talebzadeh
Hi, I am very new to hive optimiser Here I have a table with 4 million rows imported from Oracle via sqoop/hive. In this table object_id column is unique. Oracle table has primary key constraint on object_id column which is basically a unique B-tree index. I do a very simple query to

External Table without Location

2015-03-27 Thread Parth Anand
Hi, I was trying to create External table in hive. I used create external table ext_2 (id string,name string) row format delimited fields terminated by ',' stored as textfile command. This command created a table with external property as I checked by using describe formatted ext_1 command.

change Reduce_Number Of Order_By

2015-03-27 Thread 郭帅
I have some problems when I insert data with order by . The data is non-uniform , I changed the configuration below 1. set hive.optimize.sampling.orderby=true; 2. set hive.optimize.sampling.orderby.number=10; 3.set mapred.reduce.tasks=100; but when the sampling had done ,

Re: Discrepancy in String matching between Teradata and HIVE

2015-03-27 Thread Nitin Pawar
Hive does not manipulate data by its own, if your processing logic needs the trimming of spaces then you can provide that in query. On Fri, Mar 27, 2015 at 1:17 PM, @Sanjiv Singh sanjiv.is...@gmail.com wrote: Hi All, I am getting into Hive and learning hive. I have customer table in

Fail to create hive and hbase table.

2015-03-27 Thread sean . wang
Dear All, I install hadoop 2.6, hbase 1.0 and hive 1.1 in ubuntu and they are running normally. But, I integrate hive with hbase and execute the script below, hive CREATE TABLE hbase_table_1(key int, value string) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH

Re: Understanding Hive's execution plan

2015-03-27 Thread Daniel Haviv
Hi Mich, For the future, please refrain from hijacking threads and ask your questions in a separate one. Thanks, Daniel On 27 במרץ 2015, at 00:44, Mich Talebzadeh m...@peridale.co.uk wrote: I am very new to hive optimiser Here I have a table with 4 million rows imported from Oracle via

Re: Discrepancy in String matching between Teradata and HIVE

2015-03-27 Thread Raunak Jhawar
Here you are trying to compare two strings ' BUILDING ' (this value has extra white spaces) and 'BUILDING'. These strings are not same since one has bunch of extra white-spaces and other doesn't. Moreover, length of both strings is not same. This would return 1: select if('ABC' == rtrim('ABC

Re: Discrepancy in String matching between Teradata and HIVE

2015-03-27 Thread Nitin Pawar
Hive is only PRO SQL compliance, In hive the string comparisons work just like they would work in java so in hive BUILDING = BUILDING BUILDING != BUILDING (extra space added) On Fri, Mar 27, 2015 at 2:11 PM, @Sanjiv Singh sanjiv.is...@gmail.com wrote: Hi, I can use rtrim function, i.e:

Discrepancy in String matching between Teradata and HIVE

2015-03-27 Thread @Sanjiv Singh
Hi All, I am getting into Hive and learning hive. I have customer table in teradata , used sqoop to extract complete table in hive which worked fine. See below customer table both in Teradata and HIVE. *In Teradata :* select TOP 4 id,name,''||status||'' from customer; 3172460

Re: Discrepancy in String matching between Teradata and HIVE

2015-03-27 Thread @Sanjiv Singh
Hi, I can use rtrim function, i.e: select id,name,CONCAT ('' , status , '') from customer WHERE rtrim(status) = 'BUILDING' LIMIT 2; But question raised what standard in string comparison Hive uses? According to ANSI/ISO SQL-92 'BUILDING' == 'BUILDING ', Here is a link

Sort order in Hive plan?

2015-03-27 Thread Xiaoyong Zhu
Hi experts When I am viewing the Hive plans, I notice that in Reduce Output Operators, there is a property named sort order and it's value is +++ - may I know what's the meaning of the three plus signs? Sometime I also see one plus sign... Is there any document talking about this? Or where

Re: 0.14 parse exception, row format question

2015-03-27 Thread bitsofinfo
Thats just an artifact of the email formatting, all the quoting is legit INSERT OVERWRITE DIRECTORY /user/admin/mydirectory ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' select * from my_table_that_exists; *Error occurred executing hive query: Error while compiling statement: FAILED:

Re: External Table without Location

2015-03-27 Thread @Sanjiv Singh
Yes... If you do not explicitly specify location for a table, it will use the default database. *What is the use of EXTERNAL table , why do you have two table flavours :* Hive tables can be created as EXTERNAL or INTERNAL. This is a choice that affects how data is loaded, controlled, and

Re: External Table without Location

2015-03-27 Thread Raunak Jhawar
This is not a bug. If you do not explicitly specify location for a table, it will use the default database. -- Thanks, Raunak Jhawar m: 09820890034 On Fri, Mar 27, 2015 at 5:04 PM, Parth Anand parth.an...@pb.com wrote: Hi, I was trying to create External table in hive. I used

Re: rename a database

2015-03-27 Thread @Sanjiv Singh
Can I know why do you want to do so? Currently There is no command or direct way to do that..then I can suggest workaround for this. Thanks, Sanjiv Singh Regards Sanjiv Singh Mob : +091 9990-447-339 On Wed, Mar 25, 2015 at 10:01 AM, Shushant Arora shushantaror...@gmail.com wrote: Hi Is

Re: rename a database

2015-03-27 Thread Fabio C.
Maybe they just typed time_shit instead of time_shift and found it out after 3 hours of tables compression... I don't think it's too important, but which is the workaround? I'm also interested in this. Maybe it's just a matter of metastore and one could try to explore the metastore db to change

Issue with a new line character in the data

2015-03-27 Thread Dhandapani, Karthik
Hi, I have an scenario where new line character exists in data. Because of new line character, number of records in Target is more than in source. Every record that has new line character in the data is broken and it appears as 2 records in hive. When I use cat and pipe it to wc -l, I am

Re: Hive optimiser seems not to use for a covered query

2015-03-27 Thread Alan Gates
Hive's optimizer never uses the indexes. Indexes aren't fully implemented in Hive. Alan. Mich Talebzadeh mailto:m...@peridale.co.uk March 27, 2015 at 1:33

Re: rename a database

2015-03-27 Thread @Sanjiv Singh
There is already JIRA raised for this functionality and patch available with ticket. Patch moves the database directory on HDFS and changes its related metadata entities. Unit tests are also included. https://issues.apache.org/jira/browse/HIVE-4847 I have not tried it yet. Regards, Sanjiv

Re: Sort order in Hive plan?

2015-03-27 Thread Prasanth Jayachandran
Hi In the image that you had posted. There are 4 plus signs which means sorting happens on all four columns in key expression. Number of plus signs indicate the number of columns in key expressions that are used for sorting. Also minus sign indicate that sorting happens in descending order.

Re: rename a database

2015-03-27 Thread Dr Mich Talebzadeh
yep it can can happen in any server hosting a database or schema. I believe you will need to rename the database directory underr hive warehouse ditectory DBNAME.db. Then you can hack Hive metasttore database. Mine is on SAP ASE. Certain tables like DBS etc in metastoreDB need to be changed.

Re: rename a database

2015-03-27 Thread Slava Markeyev
Just to note the current patch for HIVE-4847 https://issues.apache.org/jira/browse/HIVE-4847 doesn't handle errors really well and you can potentially get in an inconsistent state if there is a failure along the way. Also, iirc external tables aren't handled properly either. -Slava On Fri, Mar

samples for JDBC to connect and query Hive?

2015-03-27 Thread Lin Ma
Hello Hive masters, I am new to Hive and wondering if any good samples to refer to of using JDBC to connect and query Hive? Thanks. regards, Lin

Re: samples for JDBC to connect and query Hive?

2015-03-27 Thread Prasad Mujumdar
Hi Lin, Checkout https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-JDBCClientSampleCode thanks Prasad On Fri, Mar 27, 2015 at 2:31 PM, Lin Ma lin...@gmail.com wrote: Hello Hive masters, I am new to Hive and wondering if any good samples to refer to

My query on Standard deviation function STDDEV() in Hive

2015-03-27 Thread Mich Talebzadeh
Hi gurus, STDDEV function can be used for both aggregates and analytics. Fortunately in Hive it has been implemented which is great. I have a simple question on this if I may I would expect the in-built function STDDEV to run pretty efficiently in most databases as they are system defined

Re: samples for JDBC to connect and query Hive?

2015-03-27 Thread Lin Ma
Thanks Prasad! Have a good weekend. regards, Lin On Fri, Mar 27, 2015 at 2:37 PM, Prasad Mujumdar pras...@cloudera.com wrote: Hi Lin, Checkout https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-JDBCClientSampleCode thanks Prasad On Fri, Mar 27,