|
57 | 57 | # MAGIC %md |
58 | 58 | # MAGIC ## How to Run |
59 | 59 | # MAGIC |
60 | | -# MAGIC Run the script in the following sequence |
| 60 | + |
| 61 | +# COMMAND ---------- |
| 62 | + |
| 63 | +# MAGIC %md |
61 | 64 | # MAGIC #### Step 1: Initialize the class |
62 | 65 | # MAGIC Import the module WSGroupMigration and initialize the class by passing following attributes: |
63 | 66 | # MAGIC - list of workspace group to be migrated (make sure these are workspace groups and not account level groups) |
|
70 | 73 |
|
71 | 74 | # COMMAND ---------- |
72 | 75 |
|
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 | | - |
87 | 76 | from uc_upgrade.group_migration import GroupMigration |
88 | 77 |
|
89 | 78 | # COMMAND ---------- |
|
98 | 87 |
|
99 | 88 | # Find this in the account console |
100 | 89 | 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 |
101 | 93 |
|
102 | 94 | # Pull from your browser URL bar. Should start with "https://" and end with ".com" or ".net" |
103 | 95 | workspace_url = "https://<DOMAIN>" |
|
107 | 99 | token = "<TOKEN>" |
108 | 100 |
|
109 | 101 | # Should the migration Check the ACL on tables/views as well? |
110 | | -checkTableACL = True |
| 102 | +checkTableACL = False |
111 | 103 |
|
112 | 104 | # What cloud provider? Acceptable values are "AWS" or anything other value. |
113 | 105 | cloud = "AWS" |
|
156 | 148 | # MAGIC %md |
157 | 149 | # MAGIC #### Adhoc Step: Selective Inventory |
158 | 150 | # 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 |
159 | 152 | # 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 |
160 | 153 | # MAGIC Call gm.performInventory with 3 parameters: |
161 | 154 | # MAGIC - mode: Workpace("workspace local group") or Account ("for workspace back up group") |
162 | 155 | # MAGIC - force: setting to True will force fresh inventory capture and updates to the tables |
163 | 156 | # MAGIC - objectType: select the list of object for which to do the fresh inventory, options are |
164 | 157 | # 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 |
165 | 166 | # 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). |
166 | 170 |
|
167 | 171 | # COMMAND ---------- |
168 | 172 |
|
| 173 | +<<<<<<< Updated upstream |
169 | 174 | gm.performInventory("Workspace", force=True, objectType="Folder") |
| 175 | +======= |
| 176 | +gm.performInventory('Workspace',force=True,objectType='Cluster') |
| 177 | +gm.printInventory() |
| 178 | +>>>>>>> Stashed changes |
170 | 179 |
|
171 | 180 | # COMMAND ---------- |
172 | 181 |
|
|
0 commit comments