Skip to main content
Choolake
Gold ⭐️
Mar 15, 2024 6:28 AM UTC
Solved

Rename of the HADOOP/HUE table name

Rename of the HADOOP/HUE table name

Hi everyone,

I need to rename the table name in HUE. i used following command.

ALTER TABLE db.table1 RENAME TO db.table2;

Please let me know the correct way to rename the table without any issue.

Thank you.

vaishaakb
vaishaakbAnswer
Gold ⭐️⭐️⭐️
Mar 15, 2024 10:36 AM UTC

@Choolake Thank you for bringing this to our Community.

The shared ALTER command should work as expected.

Ref:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTable/Partition/Column:~:text=the%20named%20table.-,Alter%20Table,-Rename%20Table

> Please let me know the correct way to rename the table without any issue.

What is your concern here? Can you also try renaming a test table in a test database and see how it goes?

HTH.

3 replies

vaishaakb
Gold ⭐️⭐️⭐️
vaishaakbAnswer
Gold ⭐️⭐️⭐️
Mar 15, 2024 10:36 AM UTC

@Choolake Thank you for bringing this to our Community.

The shared ALTER command should work as expected.

Ref:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTable/Partition/Column:~:text=the%20named%20table.-,Alter%20Table,-Rename%20Table

> Please let me know the correct way to rename the table without any issue.

What is your concern here? Can you also try renaming a test table in a test database and see how it goes?

HTH.

Translate
Choolake
ChoolakeAuthor
Gold ⭐️
Mar 18, 2024 10:47 AM UTC

Thank you!

Translate
VidyaSargur
Community Manager
Community Manager
Mar 18, 2024 3:50 PM UTC

@Choolake, Did the response assist in resolving your query? If it did, kindly mark the relevant reply as the solution, as it will aid others in locating the answer more easily in the future. 

Translate
Regards, Vidya Sargur Madabhushi| Senior Community Manager | Was your question answered? Make sure to mark the answer as the Best Answer. If you find a reply useful, say thanks by clicking on the thumbs up button.