public static List < String > getAlterOriginalPartitionLocationQueries ( PurgeableHivePartitionDataset dataset ) { List < String > queries = new ArrayList <> ( ) ; queries . add ( getUseDbQuery ( dataset . getDbName ( ) ) ) ; String partitionSpecString = PartitionUtils . getPartitionSpecString ( dataset . getSpec ( ) ) ; queries . add ( getAlterTableLocationQuery ( dataset . getTableName ( ) , partitionSpecString , dataset . getStagingPartitionLocation ( ) ) ) ; queries . add ( getUpdatePartitionMetadataQuery ( dataset . getDbName ( ) , dataset . getTableName ( ) , partitionSpecString ) ) ; return queries ; }
Will return all the queries needed to alter the location of the table partition . Alter table partition query doesn t work with syntax dbName . tableName