Skip to content

Commit c77d571

Browse files
HariGS-DBHariGS-DB
authored andcommitted
updated notebook instructions and removed notebook not related to group migration
1 parent fbc15dc commit c77d571

File tree

5 files changed

+27
-449
lines changed

5 files changed

+27
-449
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ This repo contains various functions and utilities for UC Upgrade.
66
## Latest working version and how-to
77

88
Please note that current project statis is 🏗️ **WIP**, but we have a minimal set of already working utilities.
9-
To run the notebooks please use latest LTS Databricks Runtime (non-ML), without Photon, in a single-user cluster mode with UC enabled.
9+
To run the notebooks please use latest LTS Databricks Runtime (non-ML), without Photon, in a single-user cluster mode.
10+
If you have Table ACL Clusters or SQL Warehouse where ACL have been defined, you should create a TableACL cluster to run this notebook
1011

1112
Please note that script is executed only on the driver node, therefore you'll need to use a Single Node Cluster with sufficient amount of cores (e.g. 16 cores).
1213

notebooks/GroupMigration/Workspace_Group_Migration_Notebook.py

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@
5757
# MAGIC %md
5858
# MAGIC ## How to Run
5959
# MAGIC
60-
# MAGIC Run the script in the following sequence
60+
61+
# COMMAND ----------
62+
63+
# MAGIC %md
6164
# MAGIC #### Step 1: Initialize the class
6265
# MAGIC Import the module WSGroupMigration and initialize the class by passing following attributes:
6366
# MAGIC - list of workspace group to be migrated (make sure these are workspace groups and not account level groups)
@@ -70,20 +73,6 @@
7073

7174
# COMMAND ----------
7275

73-
# MAGIC %md ## Installing the package and it's dependencies
74-
75-
# COMMAND ----------
76-
77-
from notebooks.common import install_uc_upgrade_package
78-
79-
install_uc_upgrade_package()
80-
81-
# COMMAND ----------
82-
83-
# MAGIC %md ## Main process entrypoint
84-
85-
# COMMAND ----------
86-
8776
from uc_upgrade.group_migration import GroupMigration
8877

8978
# COMMAND ----------
@@ -98,6 +87,9 @@
9887

9988
# Find this in the account console
10089
inventoryTableName = "WorkspaceInventory"
90+
# the script will create two table
91+
# WorkspaceInventory - to store all the ACL permission
92+
# WorkspaceInventoryTableACL - to store the table acl permission specifically
10193

10294
# Pull from your browser URL bar. Should start with "https://" and end with ".com" or ".net"
10395
workspace_url = "https://<DOMAIN>"
@@ -107,7 +99,7 @@
10799
token = "<TOKEN>"
108100

109101
# Should the migration Check the ACL on tables/views as well?
110-
checkTableACL = True
102+
checkTableACL = False
111103

112104
# What cloud provider? Acceptable values are "AWS" or anything other value.
113105
cloud = "AWS"
@@ -156,17 +148,34 @@
156148
# MAGIC %md
157149
# MAGIC #### Adhoc Step: Selective Inventory
158150
# MAGIC This is a adhoc step for troubleshooting purpose. Once dryRun is complete and data stored in tables, if the acl of any object is changed in the workspace
151+
<<<<<<< Updated upstream
159152
# MAGIC Ex new notebook permission added, User can force a fresh inventory of the selected object instead of doing a full cleanup and dryRun to save time
160153
# MAGIC Call gm.performInventory with 3 parameters:
161154
# MAGIC - mode: Workpace("workspace local group") or Account ("for workspace back up group")
162155
# MAGIC - force: setting to True will force fresh inventory capture and updates to the tables
163156
# MAGIC - objectType: select the list of object for which to do the fresh inventory, options are
164157
# MAGIC
158+
=======
159+
# MAGIC Ex new notebook permission added, User can force a fresh inventory of the selected object instead of doing a full cleanup and running the dryRun
160+
# MAGIC To save time call gm.performInventory with 3 parameters:
161+
# MAGIC - mode: Workpace("for workspace local group") or Account ("for workspace back up group")
162+
# MAGIC - force: setting to True will force fresh inventory capture and updates to the tables
163+
# MAGIC - objectType: select the list of object for which to do the fresh inventory, options are
164+
# MAGIC
165+
>>>>>>> Stashed changes
165166
# MAGIC "Group"(will do members, group list, entitlement, roles), "Password","Cluster","ClusterPolicy","Warehouse","Dashboard","Query","Job","Folder"(Will do folders, notebook and files),"TableACL","Alert","Pool","Experiment","Model","DLT","Repo","Token","Secret"
167+
# MAGIC Ex: gm.performInventory('Workspace',force=True,objectType='Cluster') will do:
168+
# MAGIC - fresh inventory of all cluster objects and updated the data the inventory table
169+
# MAGIC - run printInventory() to verify all the permission again (including clusters).
166170

167171
# COMMAND ----------
168172

173+
<<<<<<< Updated upstream
169174
gm.performInventory("Workspace", force=True, objectType="Folder")
175+
=======
176+
gm.performInventory('Workspace',force=True,objectType='Cluster')
177+
gm.printInventory()
178+
>>>>>>> Stashed changes
170179

171180
# COMMAND ----------
172181

notebooks/hms_external_to_uc_managed/hms-external-to-uc-managed.py

Lines changed: 0 additions & 142 deletions
This file was deleted.

notebooks/metastore_export_import/01_backup_catalog.py

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)