-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added TableMapping functionality to table migrate #752
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #752 +/- ##
==========================================
+ Coverage 80.04% 80.18% +0.14%
==========================================
Files 44 44
Lines 4610 4628 +18
Branches 859 856 -3
==========================================
+ Hits 3690 3711 +21
+ Misses 696 694 -2
+ Partials 224 223 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert moving public/private methods around, it's harder to review
test |
rules.append(Rule(**row)) | ||
skip_table = row.get("skip_table") | ||
row["skip_table"] = skip_table and skip_table == "true" | ||
rules.append(Rule(**row)) # type: ignore[arg-type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rules.append(Rule(**row)) # type: ignore[arg-type] | |
rules.append(Rule(skip_table=row.get("skip_table", "false") == "true", **row)) |
# type: ignore
is not allowed until you write 200k lines of code in python in public repositories ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed skip altogether. Skip will be handled in next PR as part of the Mapping class.
tasks.append(partial(self._migrate_table, table, rule.as_uc_table_key)) | ||
Threads.strict("migrate tables", tasks) | ||
|
||
def _migrate_table(self, src_table: Table, target_table_key): | ||
sql = src_table.uc_create_sql(target_table_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tasks.append(partial(self._migrate_table, table, rule.as_uc_table_key)) | |
Threads.strict("migrate tables", tasks) | |
def _migrate_table(self, src_table: Table, target_table_key): | |
sql = src_table.uc_create_sql(target_table_key) | |
tasks.append(partial(self._migrate_table, table, rule)) | |
Threads.strict("migrate tables", tasks) | |
def _migrate_table(self, src_table: Table, rule: Rule): | |
target_table_key = rule.as_uc_table_key | |
sql = src_table.uc_create_sql(target_table_key) |
test comment... |
* Added assessment step to estimate the size of DBFS root tables ([#741](#741)). * Added `TableMapping` functionality to table migrate ([#752](#752)). * Added `databricks labs ucx move` command to move tables and schemas between catalogs ([#756](#756)). * Added functionality to determine migration method based on DBFS Root ([#759](#759)). * Added `get_tables_to_migrate` functionality in the mapping module ([#755](#755)). * Added retry and rate limit to rename workspace group operation and corrected rate limit for reflecting account groups to workspace ([#751](#751)). * Adopted `databricks-labs-blueprint` library for common utilities to be reused in the other projects ([#758](#758)). * Converted `RuntimeBackend` query executions exceptions to SDK exceptions ([#769](#769)). * Fixed issue with missing users and temp groups after workspace-local groups migration and skip table when crawling table size if it does not exist anymore ([#770](#770)). * Improved error handling by not failing group rename step if a group was removed from account before reflecting it to workspace ([#762](#762)). * Improved error message inference from failed workflow runs ([#753](#753)). * Moved `TablesMigrate` to a separate module ([#747](#747)). * Reorganized assessment dashboard to increase readability ([#738](#738)). * Updated databricks-sdk requirement from ~=0.16.0 to ~=0.17.0 ([#773](#773)). * Verify metastore exists in current workspace ([#735](#735)).
* Added assessment step to estimate the size of DBFS root tables ([#741](#741)). * Added `TableMapping` functionality to table migrate ([#752](#752)). * Added `databricks labs ucx move` command to move tables and schemas between catalogs ([#756](#756)). * Added functionality to determine migration method based on DBFS Root ([#759](#759)). * Added `get_tables_to_migrate` functionality in the mapping module ([#755](#755)). * Added retry and rate limit to rename workspace group operation and corrected rate limit for reflecting account groups to workspace ([#751](#751)). * Adopted `databricks-labs-blueprint` library for common utilities to be reused in the other projects ([#758](#758)). * Converted `RuntimeBackend` query executions exceptions to SDK exceptions ([#769](#769)). * Fixed issue with missing users and temp groups after workspace-local groups migration and skip table when crawling table size if it does not exist anymore ([#770](#770)). * Improved error handling by not failing group rename step if a group was removed from account before reflecting it to workspace ([#762](#762)). * Improved error message inference from failed workflow runs ([#753](#753)). * Moved `TablesMigrate` to a separate module ([#747](#747)). * Reorganized assessment dashboard to increase readability ([#738](#738)). * Updated databricks-sdk requirement from ~=0.16.0 to ~=0.17.0 ([#773](#773)). * Verify metastore exists in current workspace ([#735](#735)).
* Added assessment step to estimate the size of DBFS root tables ([#741](#741)). * Added `TableMapping` functionality to table migrate ([#752](#752)). * Added `databricks labs ucx move` command to move tables and schemas between catalogs ([#756](#756)). * Added functionality to determine migration method based on DBFS Root ([#759](#759)). * Added `get_tables_to_migrate` functionality in the mapping module ([#755](#755)). * Added retry and rate limit to rename workspace group operation and corrected rate limit for reflecting account groups to workspace ([#751](#751)). * Adopted `databricks-labs-blueprint` library for common utilities to be reused in the other projects ([#758](#758)). * Converted `RuntimeBackend` query executions exceptions to SDK exceptions ([#769](#769)). * Fixed issue with missing users and temp groups after workspace-local groups migration and skip table when crawling table size if it does not exist anymore ([#770](#770)). * Improved error handling by not failing group rename step if a group was removed from account before reflecting it to workspace ([#762](#762)). * Improved error message inference from failed workflow runs ([#753](#753)). * Moved `TablesMigrate` to a separate module ([#747](#747)). * Reorganized assessment dashboard to increase readability ([#738](#738)). * Updated databricks-sdk requirement from ~=0.16.0 to ~=0.17.0 ([#773](#773)). * Verify metastore exists in current workspace ([#735](#735)).
No description provided.