I'm doing some automatic script of few queries in hive and we found that we need time to time clear the data from a table and insert the new one. And we are thinking what could be faster?
INSERT OVERWRITE TABLE SOME_TABLE
SELECT * FROM…
I'm planning to truncate the hive external table which has one partition. So, I have used the following command to truncate the table :
hive> truncate table abc;
But, it is throwing me an error stating : Cannot truncate non-managed table abc.
Can…
alter table abc add columns (stats1 map, stats2 map)
i have altered my table with above query. But after while checking the data i got NULL's for the both extra columns. I'm not getting data.
screenshot
I have a table with lots of columns.
I don't want to write something like
CREATE TABLE IF NOT EXISTS
table1(
col1 int,
col2 String,
etc....)
Is there a fast way to create a table with the same structure, but without any data?
An external table in HIVE is partitioned on year, month and day.
So does the following query delete data from external table for the specific partitioned referenced in this query?:-
ALTER TABLE MyTable DROP IF EXISTS…
I am pretty sure that complex types like STRUCT can not be the type of a partition column. But I am not sure if all the primitive types are valid or not. I have read a lot of documentation but didn't find anything.
I'm creating a new table in Hive using:
CREATE TABLE new_table AS select * from old_table;
My problem is that after the table is created, It generates multiple files for each partition - while I want only one file for each partition.
How can I…
I have come across Hive tables which I need to convert to Redshift/MySql equivalent.
I am having trouble understanding Hive query structure and would appreciate some help:
CREATE TABLE IF NOT EXISTS table_1 (
id BIGINT,
price DOUBLE,
…
I am trying to create a new table with the existing table using Hive query.
While creating a new table I want to add a new column and insert current timestamp for all the rows.
For example:
Exiting table:
|user_id|user_name|user_address|
|1001 …
I'm having some difficulties to make sure I'm leveraging sorted data within a Hive table. (Using ORC file format)
I understand we can affect how the data is read from a Hive table, by declaring a DISTRIBUTE BY clause in the create DDL.
CREATE TABLE…
I have a Hive Table with 2 columns.Employee ID and Salary.
Data is something like given below.
Employee ID Salary
1 10000.08
2 20078.67
3 20056.45
4 30000.76
5 10045.14
6 43567.76
I want to create Partitions based on Salary Column.For…
I am trying to create a HIVE table. I am not sure when we use VARCHAR and when we use String.
If we use VARCHAR then do we have to define length like we define in RDBMS as VARCHAR(10)
Please help
My question is mostly theoretical, but i have some tables that already follow some sort of partition scheme, lets say my table is partitioned by day, but after working with the data for sometime we want to modifity to month partitions instead, i…
The jar file for druid hive handler is there. Clients table is already there in hive with data. Filename in hive library folder hive-druid-handler-3.1.2.jar.
I am getting the error an when I try to create table in hive for druid
FAILED:…