In spark-sql I have a query that uses several tables (both large & small) in Joins. My question is – does the order of these tables matter with respect to query performance ? For e.g. select …
Tag: hive
Two different table counts insert into Hive Table
i need to insert data into hive table from two different table counts. example, let assume i have a table sample having fields counter1 and counter2 now i have another two tables test1 and test2. i …
Split column in hive
I am new to Hive and Hadoop framework. I am trying to write a hive query to split the column delimited by a pipe ‘|’ character. Then I want to group up the 2 adjacent values and separate them into …
Hive: Cant perform union query with limit
I am trying to run a union all query in hive but i get I also tried but i got what am i doing wrong ? Answer Use select from subquery:
SQL Query to Select Min and Max Values For Each Day Over a Period
I would like to select all the rows that contain either min or max datetime values for each equipment_id, for every day included in the period. The code below selects the min and max datetime values …
Divide each value of a column by the total count of records in a table
A query that is capable of dividing each value of a column by the total number of records in the table I tried the following query I see an error and not able to execute the query. for example total records is 5 so (1/5)*100 = 20 Answer use analytic count(*) over():
How to split a column in two columns
I have an issue with a table called “movies”. I found the date and the movie title are both in the title column. As shown in the picture: I don’t know how to deal with this kind of issues. So, I …
Hive Query : To calculate max indicator value based on priority and date
I tried to frame the query but somehow not getting the required result hence posting. I am new to hive. Apologies if it is very simple. Source Data : Ik – priority – ind1 – ind2 – date 1 – A – …
Will the constraints remain after Importing table from RDBMS to HIVE with sqoop?
When we use sqoop import to transfer an RDBMS table to HIVE, will the constraints of the table such as primary key remain ? i.e. will the column of the table which is the primary key remain as …
Range based window Frame can have only 1 sort key
Ive tried to run the next query select sum(balance) over (partition by client order by card desc, date_tr desc) from table_1 And in Result i have the next error message: FAILED: SemanticException …