Skip to content
Advertisement

Tag: hive

hive:select all column exclude two

How to select all column exclude columns ‘date’ and ‘cst_id’ in hive? Answer Try below – For single session – set hive.support.quoted.identifiers=none; refer quotedIdentifiers for more information on hive select using regular expressions

Easy table transpose in hive

I need to transpose my table. Now i have that type of table: But i want to get the next result How should i transpose my table for achieving this result? Answer Use case statements with min() or max() aggregation:

Casting the Bigint number Returns NULL

I need o convert a integer value to the highest data type in hive as my value is of 25 digits NULL value will be returned for the above select stmnt; I am very well aware that the supplied number is greater than the largest number of Bigint. But we are getting such values upon which i have to calculate

Hive Case Resulting Duplicate Row

I have a table containing contact numbers and another reference table containing a “length” variable and a number column. What I need is to find the prefix name where the prefix of the number matches …

“Hive” max column value from multiple columns

Hi: I have a situation where I need to find the max value on 3 calculated fields and store it in another field, is it possible to do it in one SQL query? Below is the example One way I tried is to calculate Personal_Income, Share_Income, Job_Income in the first pass and in the second pass I used but this

Advertisement