-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for in-place migrating external Parquet, Orc, Avro hives…
…erde tables (#1412) ## Changes 1. Add `MigrateHiveSerdeTablesInPlace` workflow to in-place upgrade external Parquet, Orc, Avro hiveserde tables. 2. Add functions in `tables.py` to describe the table and extract the hiveserde details, update the ddl from `show create table` by replacing the old table name with migration target and dbfs mount table location if any, the new ddl will be used to create the new table in UC for the in-place migrate. 3. Add `_migrate_external_table_hiveserde` function in `table_migrate.py`. Add two new arguments `mounts` and `hiveserde_in_place_migrate` in `TablesMigrator` class, `mounts` will be used to replace the dbfs mnt table location if any, `hiveserde_in_place_migrate` will be used to control which hiveserde to be migrated in current run so we can have multiple tasks running in parallel and each just migrate one type of hiveserde. This PR also removed majority of codes from PR #1432 , because only subset of table formats can be in-place migrated to UC with ddl from `show create table`. Simply creating table with the updated ddl for all `What.EXTERNAL_NO_SYNC` will fail. ### Linked issues Closes #889 ### Functionality - [ ] added relevant user documentation - [ ] added new CLI command - [ ] modified existing command: `databricks labs ucx ...` - [ ] added a new workflow - [ ] 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 --> - [x] manually tested - [x] added unit tests - [x] added integration tests - [ ] verified on staging environment (screenshot attached)
- Loading branch information
Showing
13 changed files
with
701 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.