1
votes

Suppose I have a non-transactional table in Hive named 'ccm'. It has hundreds of columns and one partition field.

I know how to create a copy with "create table abc like ccm' but I would like abc to be bucketed, ORC, and have transaction support set on via TBLPROPERTIES.

I do not want to mention all the columns in ccm when I compose the HQL.

Can I do this?

1

1 Answers

-1
votes

This answer may have the correct way to proceed in your case, and it also explains some limitation of the method used.

Create hive table using "as select" or "like" and also specify delimiter

So, from the example, you should add the missing parts:

  • CLUSTER BY
  • TBLPROPERTIES ("transactional"="true")

I have some doubts that you can achieve exactly your expected results but i would consider it as a step forward