in Big Data | Hadoop by
Q:
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 Jan 31, 2020 in Cassandra by MBarbieri
0 votes
asked Jan 31, 2020 in Cassandra by MBarbieri
...