Left function

2015-06-16 Thread Ravisankar Mani
Hi every one, how to get leftmost length of characters from the string in hive? In Mysql or sq has specific function "LEFT(string,length) " Could you please help any other way to achieve this scenario? Regards Ravisnkar

Day of year

2015-06-07 Thread Ravisankar Mani
Hi everyone, How to get 'day of year' using hive query? Could you please provide any query regarding day of year? Regards, Ravisankar

Set variable in hive query

2015-06-05 Thread Ravisankar Mani
Hi everyone, I assign values for set variable. Please refer following query SET Row_Number_0 = 0; SELECT criticid AS criticid, sum(rating) as rating, ${hiveconf:Row_Number_0}= ${hiveconf:Row_Number_0} + 1 AS R_N_1 FROM GROUP BY recommend_ratings2.criticid

Row number

2015-06-04 Thread Ravisankar Mani
SELECT criticid AS criticid, (ROW_NUMBER() Over(order by sum(rating) asc)) as a1 FROM recommend_ratings2 Group by criticid " SemanticException Failed to breakup Windowing invocations into Groups. At least 1 group must only depend on input columns. Also check for circular dependencies. Underl

Row number

2015-06-04 Thread Ravisankar Mani
Hi everyone, I need to find row number using hive query. Could you please help any way to find row number? It is the sample sql query select row_number() over (partition by NAME order by PRICE) as RANK, NAME, PRICEfrom MY_TABLE; Regards, Ravisankar

Re: Group by query

2015-06-03 Thread Ravisankar Mani
ation. > Why don't you include selected column in group by, I don't think so it > will affect your output. > > Thanks, > Bhagwan > > On Wed, Jun 3, 2015 at 4:05 PM, Ravisankar Mani wrote: > >> Hi everyone, >> >>I have selected specific col

Re: Top N query

2015-06-03 Thread Ravisankar Mani
Hi gopal, Thanks for your response. I does't understand about your solution. Could you please provide exact query? Regards, Ravi On Wed, Jun 3, 2015 at 2:23 PM, Gopal Vijayaraghavan wrote: > Hi, > > This particular case can be handled by a special case of the inner > equijoin. > > > ( recom

Re: Top N query

2015-06-03 Thread Ravisankar Mani
> Arpita Singh > > > > *From:* Ravisankar Mani [mailto:rrav...@gmail.com] > *Sent:* Wednesday, June 03, 2015 11:29 AM > *To:* user@hive.apache.org > *Subject:* Top N query > > > > Hi everyone, > >"FAILED: SemanticException [Error 10019]: Line 9

Group by query

2015-06-03 Thread Ravisankar Mani
Hi everyone, I have selected specific column using aggregation ." FAILED: SemanticException [Error 10002]: Line 2:26 Invalid column reference 'contactid " . Exception occur while executing following query. But it working in sql server without using group by. Kindly refer the query. S

Top N query

2015-06-03 Thread Ravisankar Mani
Hi everyone, "FAILED: SemanticException [Error 10019]: Line 9:5 OR not supported in JOIN currently 'movieid_0' " Exception occur while executing the following query. But i need the add the conditions. Kindly help other way to resolve the query. Please refer the following query

Null condition hive query

2015-06-02 Thread Ravisankar Mani
Hi Everyone, I need to check condition measure value is null or not. If it is null is then replace 0 otherwise in returns same values It is a sample sql query SELECT ISNULL(SUM(CAST([Purchasing].[Vendor].[BusinessEntityID] AS decimal(38,6))),0) AS [BusinessEntityID], [Purchasing].[Vendor].[Ac

Top N list in Hive

2015-06-02 Thread Ravisankar Mani
Hi Everyone, I am unable to get top N list when using Hive guery. But I get top N list properly in sql Example "SELECT TOP 2 * FROM Customers" Could you please provide other way to find top n tables Regards, Ravisankar M R

Keys in Hive

2015-06-02 Thread Ravisankar Mani
Hi everyone, I am unable to create an table in hive with primary key Example : create table Hivetable((name string),primary key(name)); Could please help about the primary key query? Regards, Ravisankar M R

Regarding Views In Hive Query

2015-06-02 Thread Ravisankar Mani
Hi Everyone, I have one clarification about views query. I can able to create views using corresponding hive query. But I not able to get 'views list 'in a database like 'show tables'. Can you help about this query? Regards, Ravisankar M R