-
Notifications
You must be signed in to change notification settings - Fork 88
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
[FEATURE]: Connect _migrate_table_create_ctas
to migrate-tables
workflow
#332
Comments
MANAGED
and EXTERNAL
non-Parquet/non-Delta tables
Can we split issues between MANAGED (step:managed tables) and EXTERNAL (step:sync tables). This maps to go/uc/upgrade |
MANAGED
and EXTERNAL
non-Parquet/non-Delta tablesMANAGED
non-Parquet/non-Delta tables
I'm changing the name of this issue from: to Migrate MANAGED non-Parquet/non-Delta tables because:
|
One additional consideration to make with Managed tables, which is different to external tables, is that it needs to be executed as much as possible as an atomic transaction: BEGIN TRANSACTION
At some point, after an acceptable retention period, you will want to purge that old table's data too. This is to prevent data from being written to the old table while the upgrade is being performed. Additionally, you want to prevent data from being written to the old table after you have upgraded to the new table. |
One option we may want to provide customers is to convert the managed table into an external table first (still using HMS). If that completes successfully, then that external table can be upgraded more easily using our external table upgrade process. External tables are easier to upgrade because you can upgrade their metadata independent of the job. You don't need to worry about the atomic transaction so much. |
MANAGED
non-Parquet/non-Delta tables_migrate_table_create_ctas
to migrate-tables
workflow
…ate_table workflow (#1621) ## Changes There are 3 workflows for migrating tables. migrate_tables: covers EXTERNAL_SYNC, DBFS_ROOT_DELTA, VIEW migrate-external-hiveserde-tables-in-place-experimental: covers EXTERNAL_HIVESERDE and VIEW migrate-external-tables-ctas: covers EXTERNAL_NO_SYNC, EXTERNAL_HIVESERDE and VIEW - This change adds the remaining scenario DBFS_ROOT_NON_DELTA to the migrate_tables workflow - Also adds AclMigrationWhat.PRINCIPAL to the ACL migration strategy Resolves #332 ### Functionality - [ ] added relevant user documentation - [ ] added new CLI command - [ ] modified existing command: `databricks labs ucx ...` - [ ] added a new workflow - [X] modified existing workflow: `...` - [ ] added a new table - [ ] modified existing table: `...` ### Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] manually tested - [X] added unit tests - [X] added integration tests - [ ] verified on staging environment (screenshot attached) --------- Co-authored-by: vuong-nguyen <[email protected]> Co-authored-by: Vuong <[email protected]>
most of the code is done in:
Diff:
ucx/src/databricks/labs/ucx/hive_metastore/table_migrate.py
Lines 286 to 299 in 9cb9dbf
Tasks:
CREATE TABLE ... LIKE ...
upgraded_to
propertyThe text was updated successfully, but these errors were encountered: