Micah Pearce
Micah Pearce

Reputation: 1945

Is defining a delimiter in a hive ORC Table useless?

When you create a ORC table in hive, you are changing the file type to be orc. This means you can't look at a specific file outside of the orc table.

Here's an example orc create table statement

CREATE TABLE IF NOT EXISTS table_orc_v1
(
col1 int,
col2 int
)
PARTITIONED BY (odate date)
CLUSTERED BY (col1) INTO 10 BUCKETS
STORED AS ORC TBLPROPERTIES('transactional'='true');

If I try to make this a csv table (like you do on a non-orc table) will it

1) not affect table performance 2) slow down performance as it converts things to a csv file that you can never read 3) give me some benefit that I'm not aware of 4) do something else

ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','

Upvotes: 0

Views: 838

Answers (2)

Jack Old
Jack Old

Reputation: 1

also, COLLECTION ITEMS TERMINATED BY, LINES TERMINATED BY,MAP KEYS TERMINATED BY, are also useless while using binary stored format.Because it has its own style without any other character.

Upvotes: 0

Gaurang Shah
Gaurang Shah

Reputation: 12930

if you are using any binary format (ORC, AVRO, Parquet) to store you data then ROW FORMAT DELIMITED FIELDS TERMINATED BY is just ignored, you can use it in your table syntax, it might not give you any error. However they are not being used

Upvotes: 3

Related Questions