Skip to content

Commit ebb3c41

Browse files
authored
Update src/databricks/labs/ucx/hive_metastore/tables.py
1 parent 626c30a commit ebb3c41

File tree

1 file changed

+3
-3
lines changed
  • src/databricks/labs/ucx/hive_metastore

1 file changed

+3
-3
lines changed

src/databricks/labs/ucx/hive_metastore/tables.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ def _init_default_catalog(default_catalog):
174174
def migrate_tables(self):
175175
tasks = []
176176
for table in self._tc.snapshot():
177+
target_catalog = self._default_catalog
177178
if self._database_to_catalog_mapping:
178-
tasks.append(partial(self._migrate_table, self._database_to_catalog_mapping[table.database], table))
179-
else:
180-
tasks.append(partial(self._migrate_table, self._default_catalog, table))
179+
target_catalog = self._database_to_catalog_mapping[table.database]
180+
tasks.append(partial(self._migrate_table, target_catalog, table))
181181
ThreadedExecution.gather("migrate tables", tasks)
182182

183183
def _migrate_table(self, target_catalog, table):

0 commit comments

Comments
 (0)