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 ...
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
6
Solved
After adding a partition to an external table in Hive, how can I update/drop it?
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?
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...
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 ...
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 ...
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...
6
Solved
Similar to SHOW TABLES command, do we have any such command to list all databases created so far?
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...
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...
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...
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...
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...
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...
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 ...
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.
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...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.