Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [hiveql]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
35 views

How to pass multiple values into hive hql for the same hivevar

Requirement : My Hql has below script in which I want to pass values into the where clause dynamically. How do I dynamically pass using hivevar in below specific scenario where multiple values are ...
RaCh's user avatar
  • 11
1 vote
1 answer
278 views

For each tuple, get the name of the first column which is non-zero

I have a table in Hive which looks like: | Name | 1990 | 1991 | 1992 | 1993 | 1994 | | Rex | 0 | 0 | 1 | 1 | 1 | | Max | 0 | 0 | 0 | 0 | 1 | | Phil | 1 | 1 | 1 ...
user2891462's user avatar
1 vote
0 answers
247 views

Container is running beyond physical memory and killed on request (code 143) [closed]

I ran a query which involved a JOIN and an AVG operation: SELECT AVG(user_amount) AS average_user_per_game FROM ( SELECT start_time ,end_time ,COUNT(DISTINCT ID) AS ...
Memphis Meng's user avatar
0 votes
0 answers
23 views

Field with Top Ranking Field Name

Let's imagine a table structured like this: Bucket Red Blue Green First 1 3 4 Second 6 5 2 What I'm trying to achieve is based on the values within each bucket, I'd like to generate another set of ...
Franco Buhay's user avatar
0 votes
1 answer
568 views

I am trying to write a join using temporary table in hive

I am trying to write a join using subquery/ temporary table in hive but it doesn't seem to be working: create temporary table q as select server, max(time) as time from ghs group by header.server; ...
user1795999's user avatar
1 vote
0 answers
67 views

Can I assign an index to an exploded array?

I'm doing a LATERAL EXPLODE on an array in Hive, is there a way of reliably assigning a row number based on the array element? It looks like calling row_number() on the results of the LATERAL EXPLODE ...
PhilHibbs's user avatar
  • 539
0 votes
1 answer
696 views

Can I MERGE INTO ... INSERT with a column list in Hive?

Here's a good example of a MERGE statement: MERGE INTO target AS T USING source AS S ON T.ID = S.ID and T.tran_time = S.tran_time WHEN MATCHED UPDATE SET quantity = S.quantity WHEN MATCHED AND S....
PhilHibbs's user avatar
  • 539
1 vote
0 answers
23 views

Defining external table on JSON with an @ sign in an element

I need to define a Hive external table onto a JSON file that has @ signs in its elements, e.g. { "data": { "@type": "person", "name": "Phil", "job": "Programmer" } } This works: create external ...
PhilHibbs's user avatar
  • 539