|
| 1 | + |
| 2 | +=== Deploy a schema with a registered model in it, and rename the schema out of band |
| 3 | + |
| 4 | +>>> [CLI] bundle deploy |
| 5 | +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... |
| 6 | +Created registered_models.model1 |
| 7 | +Created schemas.schema1 |
| 8 | +Files: 3 uploaded, 0 deleted |
| 9 | +Resources: 2 created, 0 changed, 0 deleted, 0 unchanged |
| 10 | + |
| 11 | +>>> [CLI] schemas update main.test-schema-[UNIQUE_NAME] --new-name test-schema-renamed-[UNIQUE_NAME] |
| 12 | +{ |
| 13 | + "full_name": "main.test-schema-renamed-[UNIQUE_NAME]", |
| 14 | + "schema_id": "[UUID]" |
| 15 | +} |
| 16 | + |
| 17 | +=== Follow the rename in the config and remove the model from it: the model has no internal ID, but is found at its new path inside the bundle's schema |
| 18 | + |
| 19 | +>>> [CLI] bundle plan |
| 20 | +delete registered_models.model1 |
| 21 | + |
| 22 | +Plan: 0 to add, 0 to change, 1 to delete, 1 unchanged |
| 23 | + |
| 24 | +=== Deploy deletes the model at its new path, and keeps the schema |
| 25 | + |
| 26 | +>>> [CLI] bundle deploy --auto-approve |
| 27 | +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... |
| 28 | +Deleted registered_models.model1 |
| 29 | +Files: 2 uploaded, 0 deleted |
| 30 | +Resources: 0 created, 0 changed, 1 deleted, 1 unchanged |
| 31 | + |
| 32 | +>>> print_requests.py //unity-catalog |
| 33 | +{ |
| 34 | + "method": "DELETE", |
| 35 | + "path": "/api/2.1/unity-catalog/models/main.test-schema-renamed-[UNIQUE_NAME].mymodel" |
| 36 | +} |
| 37 | + |
| 38 | +>>> musterr [CLI] registered-models get main.test-schema-renamed-[UNIQUE_NAME].mymodel |
| 39 | +Error: Routine or Model 'main.test-schema-renamed-[UNIQUE_NAME].mymodel' does not exist. |
| 40 | + |
| 41 | +>>> [CLI] schemas get main.test-schema-renamed-[UNIQUE_NAME] |
| 42 | +{ |
| 43 | + "full_name": "main.test-schema-renamed-[UNIQUE_NAME]", |
| 44 | + "schema_id": "[UUID]" |
| 45 | +} |
| 46 | + |
| 47 | +>>> [CLI] bundle destroy --auto-approve |
| 48 | +The following resources will be deleted: |
| 49 | + delete resources.schemas.schema1 |
| 50 | + |
| 51 | +This action will result in the deletion of the following UC schemas. Any underlying data may be lost: |
| 52 | + delete resources.schemas.schema1 |
| 53 | + |
| 54 | +All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default |
| 55 | + |
| 56 | +Destroy: 1 deleted |
0 commit comments