in utilities/Hive_metastore_migration/src/hive_metastore_migration.py [0:0]
def transform(self, hms, databases, tables, partitions):
# for metastore tables that require unique ids, find max id (start id)
# for rows already in each table
self.get_start_id_for_id_name(hms)
# establish foreign keys between dbs, tbls, partitions, sds
ms_dbs = self.reformat_dbs(self.extract_dbs(databases))
ms_tbls = self.reformat_tbls(self.extract_tbls(tables, ms_dbs))
ms_partitions = self.reformat_partitions(self.extract_partitions(partitions, ms_dbs, ms_tbls))
(ms_sds, ms_tbls, ms_partitions) = self.extract_sds(ms_tbls, ms_partitions)
ms_sds = self.reformat_sds(ms_sds)
# extract child tables from above four tables and then clean up extra columns
self.extract_from_dbs(hms, ms_dbs)
self.extract_from_tbls(hms, ms_tbls)
self.extract_from_sds(hms, ms_sds)
self.extract_from_partitions(hms, ms_partitions)