I saw application are droping external table and creating again then loading the data and runnning msck command every time data load..what is the benefit of this on every time dropping and creating?
I've have a CSV files which contain date and timestamp values in the below formats. Eg:
Col1|col2
01JAN2019|01JAN2019:17:34:41
But when I define Col1 as Date and Col2 as Timestamp in my create statement, the Hive tables simply returns NULL when I…
I'm trying to map two columns into one on Athena using JsonSerDe properties.
In this case, I want to map both columns conversionsRate and cr from jsons 1 and 2 to column cr_new (doing like a coalesce).
json1
{
"deviceType": "TABLET",
"day":…
I am not able to drop partition in hive table.
ALTER TABLE db.table drop if exists partition(dt="****-**-**/id=**********");
OK
Time taken: 0.564 seconds
But partitions are not getting deleted
Below is the what I get when I check partitions of my…
I'm trying input a text file delimited with ";", but it does not work.
The create tables is OK, but all data is in one column (tp_registro).
tp_registro …
I don't know which table properties I have to use for input text file without header. My text file only has one column.
I have this example:
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
…
The Managed and External tables are created with the same location.
When you drop the internal table what will happen to the data file?
Will it cause any problem to external table or the file location of the external table?
Let's suppose I have two hive tables, table_1 and table_2. I use:
ALTER TABLE table_2 ADD PARTITION (col=val) LOCATION [table_1_location]
Now, table_2 will have the data in table_1 at the partition where col = val.
What I want to do is reverse this…
I’m creating a external table using Serde
org.apache.hive.hcatalog.data.JsonSerde
Hdfs folder location has multiple file formats and I would like to import only json files types . I tried to use
**SERDEPROPERTIES (“input.regex” = “*.json”)**…
I have a external hive table employee which is partitioned by extract_timestamp (yyyy-mm-dd hh:mm:ss) as below.
empid empname extract_time
1 abc 2019-05-17 00:00:00
2 def 2019-05-18 14:21:00
I am trying to remove…
For a set of datafiles stored in hdfs in a year/*.csv structure as follows:
$ hdfs dfs -ls air/
Found 21 items
air/year=2000
drwxr-xr-x - hadoop hadoop 0 2019-03-08 01:45 air/year=2001
drwxr-xr-x - hadoop hadoop 0…
I have a simple hive table:
hive> show create table tweets;
OK
CREATE EXTERNAL TABLE `tweets`(
`json_body` string COMMENT 'from deserializer')
ROW FORMAT SERDE
'org.apache.hive.hcatalog.data.JsonSerDe'
STORED AS INPUTFORMAT
…
Need to add extra date column in my existing hive table so that it picks up the
current date from the system for that day
hive (hivejobs)>
select * from my_current_Table;
OK
name age
Aditya 2
Aditya 7
I want to add a date column here so that i…
I want to be able to define (or create) a HIVE table with location having a variable. As the variable value changes, query on the HIVE table should read the files under the new location based on the variable value. Specifically, I want to use…