0 votes
in Big Data | Hadoop by
How will you rename a table in Hive without using ALTER command?

1 Answer

0 votes
by

We can use IMPORT/EXPORT statements to rename a table in Hive.

We first export the original table to a location by EXPORT statement.

hive> EXPORT TABLE

tableName TO

’TEMP_LOCATION’

 

Then we create new table with IMPORT statement.

hive> IMPORT TABLE

newTableName FROM ’TEMP_LOCATION’

Related questions

0 votes
asked Apr 1, 2020 in Big Data | Hadoop by AdilsonLima
+1 vote
asked Jan 12, 2020 in Big Data | Hadoop by sharadyadav1986
...