You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix issue with migrating MANAGED hive_metastore table to UC for CONVERT_TO_EXTERNAL scenario (#3020)
<!-- REMOVE IRRELEVANT COMMENTS BEFORE CREATING A PULL REQUEST -->
## Changes
This PR updates the process for doing the CONVERT_TO_EXTERAL scenario.
It splits the functionality of converting the HMS table to external into
a separate workflow task, which is executed from the non-UC cluster.
Once converted the migrate table function for external sync ensures the
table is migrated as external to UC
Resolves#2840
### Functionality
- [ ] added a new workflow
- [ ] modified existing workflow: `...`
### Tests
<!-- How is this tested? Please see the checklist below and also
describe any other relevant tests -->
- [ ] added unit tests
- [ ] added integration tests
update_sql=f"UPDATE {escape_sql_identifier(inventory_table)} SET object_type = 'EXTERNAL' WHERE catalog='hive_metastore' AND database='{src_table.database}' AND name='{src_table.name}';"
"Migrate MANAGED HMS table as EXTERNAL UC table. This option would require you to convert MANAGED HMS tables to EXTERNAL HMS tables once UC migration is complete, otherwise deleting HMS MANAGED table would delete the migrated UC table": 'SYNC_AS_EXTERNAL',
382
382
"Copy data from MANAGED HMS to MANAGED UC table": 'CLONE',
383
-
"Convert MANAGED HMS table to EXTERNAL HMS table and migrate as EXTERNAL UC table. This risks data leakage, as once the relevant HMS tables are deleted, the underlying data won't get deleted anymore.": 'CONVERT_TO_EXTERNAL',
383
+
"Convert MANAGED HMS table to EXTERNAL HMS table and migrate as EXTERNAL UC table. Once the relevant HMS tables are deleted, the underlying data won't get deleted anymore, consider the impact of this change on your data workloads": 'CONVERT_TO_EXTERNAL',
"UPDATE `hive_metastore`.`inventory_database`.`tables` SET object_type = 'EXTERNAL' WHERE catalog='hive_metastore' AND database='db1_src' AND name='managed_other';"
0 commit comments