I am trying to run the following
alter table historical_data drop partition (my_date not rlike '[A-Za-z]');
Which gives me an Exception
org.apache.hadoop.hive.ql.parse.ParseException: line 2:69 mismatched input 'not' expecting set null in drop…
I'm a newbie on hive, so a basic question: How do I create a query such that the result of that query is partitioned in a specific way?
For example:
CREATE TABLE IF NOT EXISTS tbl_x (
x SMALLINT,
y FLOAT)
PARTITIONED BY (id SMALLINT)
ROW FORMAT…
I am using load data syntax to load a csv file to a table.The file is same format as hive accepts. But still after load data is issued, Last 2 columns returns null on…
I would like to create externel table using like option.
CREATE EXTERNAL TABLE IF NOT EXISTS test1 (rec string)
LIKE 'EPCTR_201804'
LOCATION '/hdfs/t1/tt1/PR/34/1xx/E1ERPSE/201801/PR/20180202-000758/*';
But this error was shown saying : …
I have an external table, now I want to add partitions to it. I have 224 unique city id's and I want to just write alter table my_table add partition (cityid) location /path; but hive complains, saying that I don't provide anything for the city id…
I mistakenly executed the following ALTER statement with table stocks:
ALTER TABLE stocks
CLUSTERED BY (exchange, symbol)
INTO 48 BUCKETS;
How to undo this command?
I have a number Views in Hive. Most of the views were created using a pattern select * rather than specific column names. When a column was removed from the base table, all these views started throwing missing column errors. I couldn't even do a…
I have a table stored in ORC format with a bloom filter defined for 1 column. Is it possible to add a filter for another column (without reinserting the data) after the table is created and populated with data ?
I've folder on hdfs
/user/test/year=2016/month=04/dt=25/000000_0
Need to add this above partition path to a test table.
command :
ALTER TABLE test ADD IF NOT EXISTS PARTITION (year=2016,month=04,dt=25)
But this add partition command is ignoring the…
Is it possible to create a hive view on top of a nonexistent hive table or views?. This ability will help us deploy the hive DDL without any order at the time of refresh (migrating tables or views from one environment to another). In our…
I know when we try to delete the table, it only deletes meta data but not data. But what could be the particular production use case in industry where internal tables may not be useful and it can only be achieved through external tables?
If we…
I have a partitioned by column 'date' table to which I added a column like so:
ALTER TABLE table_name ADD COLUMNS (message_id_external string) CASCADE;
Do I need to do msck repair table after this and analyze table table_name partition(date)…
I have to replicate a process for a client. I have never worked with Hive, so I am trying to understand what they were doing in other cases.
The Hive script I am trying to understand is this one:
DROP TABLE IF EXISTS…