Hive alter location statement not working

I figured out the error and fixed it. The issue was that during the creation of the table i set its location to a non existent path on hdfs. So when i was trying to alter its location,it wasn't allowing me to do so.

The resolution: I first created the directory to which the table was currently pointed to and then created the directory to which i wanted to point the table to. Then the alter table location statement worked as required.

Tags:

Hive