Questions tagged [hiveddl]

Use this tag for questions about Apache Hive Data Definition Language.

Official documentation: LanguageManual DDL

117 questions
1
vote
1 answer

drop column from a partition in hive external table

I have a hive external table with 3 partition columns (A,B,C) and now I want to drop B and C columns from the partition.Is it possible to do so? I have tried with Alter table tab_name drop column col_name; --- but it throws an error stating…
AnuC
  • 23
  • 3
1
vote
1 answer

Hive External Table is pointing to old location after altering the location to new path

Initially I create a Hive external table following location hdfs://user/temp2 and then I altered the location to following. hdfs://user/temp3 Now even after running MSCK repair table my table is pointing to old location…
AnuC
  • 23
  • 3
1
vote
1 answer

drop table command with partitions column in hive

Does drop table command in hive also drop partitions? I just want to know that or we have to use alter table table_name drop partition() command for this?
Manish Pansari
  • 371
  • 4
  • 9
1
vote
1 answer

CREATE TABLE doesn't load data from disk

I have a bunch of parquet files and I'm trying to load them into hive with the following query: CREATE EXTERNAL TABLE `events` ( // ... fields ... ) PARTITIONED BY (... partition columns ...) SORED AS PARQUET LOCATION…
user3685285
  • 6,066
  • 13
  • 54
  • 95
1
vote
1 answer

Import csv file into Qubole

I am using qubole to run presto queries. I need to upload a csv file into my query but cannot figure out how to do this. Does anyone have any experience with this? For more details, I am under the analyze section. This is what I have so far…
nak5120
  • 4,089
  • 4
  • 35
  • 94
1
vote
2 answers

Hive - Create Table statement with 'select query' and 'partition by' commands

I want to create a Partitioned Table in Hive. I know to create a table structure first with the help of "Create table ... Partitioned by" command and then insert the data into the table using "Insert Into Table" command But what I am trying to do is…
JKC
  • 2,498
  • 6
  • 30
  • 56
1
vote
1 answer

Auto selected delimiter while using csv-serde

Have created a table using: ) ROW FORMAT SERDE 'com.bizo.hive.serde.csv.CSVSerde' with serdeproperties( "field.delim"="|" ) When I tried to upload a file, that is comma-delimited, it has been uploaded correctly. How is it possible, if I had…
Anastasia
  • 25
  • 1
  • 4
1
vote
1 answer

insert data into table using csv file in HIVE

CREATE TABLE `rk_test22`( `index` int, `country` string, `description` string, `designation` string, `points` int, `price` int, `province` string, `region_1` string, `region_2` string, `taster_name` string, `taster_twitter_handle` string,…
1
vote
1 answer

duplicated hive table is much larger than the original one

I have one table table1, then I used "create table table2 as select * from table1 where partition_key is not null;" to duplicate it. table1 is only 463.2 GB, but table2 turns out to be 2.8 TB. Why has this happened? PS: I just displayed the…
daydayup
  • 2,049
  • 5
  • 22
  • 47
1
vote
1 answer

different action of cast and alter in hive

Currently, I try to union several tables in hive. After I achieved this, I found that some column type is not proper. I thought some should be float but some kind it becomes string. Then I ran alter command:alter table table_name change column_name…
G_cy
  • 994
  • 3
  • 13
  • 28
1
vote
1 answer

Create hive table from JSON data

I have a file with Json data which takes the below form: Ex: { "Name": "xxxx", "Address": [{ "Street": "aa", "City": "bbb" }, { "Street": "ccc", "City": "ddd", "Country": "eee" }] } The…
Cheater
  • 435
  • 1
  • 4
  • 16
1
vote
1 answer

Hive - static partitioning - difference between creating the partition directory directly vs using alter table statement

Are there any internal/performance difference between the below two statements for creating static partitioning in hive, I have tried both ways and both of them are working without any issues after loading the data into partition dfs -mkdir…
venkata
  • 447
  • 3
  • 15
1
vote
1 answer

How to find the number of tables created in a database in hive?

I need to find out the number of tables created in each schemas and find out the size occupied by each schema.
user5717949
  • 77
  • 3
  • 8
0
votes
1 answer

Non-string values showing as NULL in Hive

Im new to HIVE and creating my first table! for some reason all non-string values are showing as NULL (including int, BOOLEAN, etc.) my data looks like this sample…
0
votes
1 answer

Is there anyway to change the datatype of the non-partition column of the external hive table?

I am trying to change the datatype of the non-partition column of the external hive table which is a partitioned table? For example, I have a partitioned table called trans in which I have 5 columns. transactions(data type = string ), product(data…