hiveql Questions

4

Since we can get the row number assigned using the row_number() and if we want to find the rank of each row without skipping of any number within the partition using dense_rank(), why do we need ra...
Derivation asked 19/10, 2020 at 3:0

18

Solved

I have configured my Hive as given on link: http://www.youtube.com/watch?v=Dqo1ahdBK_A, but I am getting the following error while creating a table in Hive. I am using hadoop-1.2.1 and hive-0.12.0....
Refuse asked 28/3, 2014 at 11:17

8

I am working on a test in which I must find out the number of partitions of a table and check if it is right. If I use show partitions TableName I get all the partitions by name, but I wish to get ...
Marchpast asked 18/2, 2014 at 15:4

6

Solved

From hive -h : --hiveconf <property=value> Use value for given property --hivevar <key=value> Variable subsitution to apply to hive commands. e.g. --hivevar A=B
Foresheet asked 23/6, 2016 at 16:23

6

Solved

After adding a partition to an external table in Hive, how can I update/drop it?
Galingale asked 11/12, 2012 at 7:0

5

Solved

I'm completely new to Hive and Stack Overflow. I'm trying to create a table with complex data type "STRUCT" and then populate it using INSERT INTO TABLE in Hive. I'm using the following code: CRE...
Aindrea asked 8/9, 2016 at 15:9

4

Solved

Assuming you have "table" already in Hive, is there a quick way like other databases to be able to get the "CREATE" statement for that table?
Speaking asked 8/8, 2013 at 19:8

4

I have a table pos.pos_inv in hdfs which is partitioned by yyyymm. Below is the query: select DATE_ADD(to_date(from_unixtime(unix_timestamp(Inv.actvydt, 'MM/dd/yyyy'))),5), to_date(from_unixtime...
Winthrop asked 20/8, 2016 at 1:23

4

Solved

Let's say I have a hive table that looks like this: ID event order_num ------------------------ A red 2 A blue 1 A yellow 3 B yellow 2 B green 1 ... I'm trying to use collect_list to generate a ...
Ionia asked 8/6, 2018 at 18:47

4

I would like to know what is the replacement of NULLIF in Hive? I am using COALESCE but its not serving my requirement. My query statement is something like : COALESCE(A,B,C) AS D COALESCE will ...
Trigraph asked 9/10, 2015 at 18:21

19

Solved

Can anyone tell me the difference between Hive's external table and internal tables. I know the difference comes when dropping the table. I don't understand what you mean by the data and metadata i...
Comorin asked 11/6, 2013 at 7:12

6

Solved

Similar to SHOW TABLES command, do we have any such command to list all databases created so far?
Collect asked 5/11, 2013 at 4:33

3

Solved

For example I have few Hive HQL statements which I want to pass into Spark SQL: set parquet.compression=SNAPPY; create table MY_TABLE stored as parquet as select * from ANOTHER_TABLE; select * fro...
Peaked asked 29/4, 2016 at 12:29

3

Solved

Suppose my table looks something like: Col1 Col2 Col3.....Col20 Col21 Now I want to select all but Col21. I want to change it to unix_timestamp() before I insert into some other table. So the tr...
Telegraph asked 8/7, 2018 at 0:16

3

Solved

I have a hive table, name age sal A 45 1222 B 50 4555 c 44 8888 D 78 1222 E 12 7888 F 23 4555 I want to calculate median of age column. Below is my approach select min(age) as HMIN,max(age) a...
Bronk asked 11/11, 2014 at 10:51

3

Solved

I am using Spark SQL (I mention that it is in Spark in case that affects the SQL syntax - I'm not familiar enough to be sure yet) and I have a table that I am trying to re-structure, but I'm gettin...
Jurel asked 19/10, 2015 at 17:57

2

Solved

I want to convert an array to string in hive. I want to collect_set array values to convert to string without [[""]]. select actor, collect_set(date) as grpdate from actor_table group by actor; ...
Subadar asked 2/8, 2016 at 3:12

2

Solved

How can I insert overwrite directory with json schema? There is raw hive avro table; (this is actually has many fields) tb_test-------- name string kickname string ----------------- then I want...
Brevier asked 22/4, 2016 at 13:31

10

Solved

I have two tables, table1 and table2. Each with the same columns: key, c1, c2, c3 I want to check to see if these tables are equal to eachother (they have the same rows). So far I have these two...
Telemann asked 4/8, 2015 at 11:55

1

From time to time, when developers run hive queries, they get the following error (first log entry below). When I look through the hive longs on the node, I see that Metastoreclient lost connectio...
Azpurua asked 28/4, 2016 at 16:24

2

I am not able to run ALTER TABLE MY_EXTERNAL_TABLE RECOVER PARTITIONS; on hive 1.2, however when i run the alternative MSCK REPAIR TABLE MY_EXTERNAL_TABLE its just listing the partitions which aren...
Counterfactual asked 23/9, 2016 at 13:5

3

Solved

This is the below Hive Table CREATE EXTERNAL TABLE IF NOT EXISTS SampleTable ( USER_ID BIGINT, NEW_ITEM ARRAY<STRUCT<PRODUCT_ID: BIGINT,TIMESTAMPS:STRING>> ) And this is the data in ...
Noach asked 7/7, 2012 at 8:36

3

I have created a table couple months ago. Is there any way in HIVE that I can see when was the table created? show table doesn't give the date creation of the table.
Aerostatics asked 1/6, 2015 at 13:31

2

Solved

in Hive I'd like to dynamically extract information from a table, save it in a variable and further use it. Consider the following example, where I retrieve the maximum of column var and want to us...
Deedeeann asked 13/5, 2016 at 9:36

6

Solved

I am inserting records using left joining in Hive.When I set limit 1 query works but for all records query get stuck at 99% reduce job. Below query works Insert overwrite table tablename select ...
Lunchroom asked 21/7, 2015 at 2:28

© 2022 - 2024 — McMap. All rights reserved.