Questions tagged [hiveql]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
13 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 ...
0
votes
0answers
5 views

Hive nested SUM over partition - error

I'm trying to get cumulative sum in one query. It works fine in SQL, PRESTO etc. but not in HIVE, which throws error msg. create table test(store varchar(10), item int, quantity int) insert into test ...
0
votes
0answers
20 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 ...
0
votes
1answer
49 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; ...
1
vote
0answers
18 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 ...
0
votes
1answer
204 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....
1
vote
0answers
10 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 ...