Skip to content

Added support for import and export of Table ACLs. (Access Control Li…#35

Merged
mrchristine merged 3 commits into
databrickslabs:masterfrom
tomidatabricks:master
May 10, 2021
Merged

Added support for import and export of Table ACLs. (Access Control Li…#35
mrchristine merged 3 commits into
databrickslabs:masterfrom
tomidatabricks:master

Conversation

@tomidatabricks

Copy link
Copy Markdown
Contributor

This is an experimental version see below:

New class TableACLsClient.py coordinates the
import and export of table ACLS to and from a JSON format.

The actual import and export logic is implemented in two notebooks:
../data/notebooks/Export_Table_ACLs.py
../data/notebooks/Import_Table_ACLs.py

The actual import export logic in the notebooks needs more testing
especially around changing ownership and Functions.
But it should work for Databases, Tables and Views.

…sts)

This is an experimental version see below:

New class TableACLsClient.py coordinates the
import and export of table ACLS to and from a JSON format.

The actual import and export logic is implemented in two notebooks:
    ../data/notebooks/Export_Table_ACLs.py
    ../data/notebooks/Import_Table_ACLs.py

The actual import export logic in the notebooks needs more testing
especially around changing ownership and Functions.
But it should work for Databases, Tables and Views.
Comment thread data/notebooks/Export_Table_ACLs.py Outdated
Comment thread data/notebooks/Export_Table_ACLs.py Outdated

#dbutils.widgets.removeAll()
dbutils.widgets.text("Databases","tomi_schumacher_adl_test, tomi_schumacher_adl_test_restricted","1: Databases (opt)")
dbutils.widgets.text("OutputPath","dbfs:/tmp/migrate/tomi_table_acl_perms.json.gz","2: Output Path")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar feedback here, let's remove tomi from the file name.

Comment thread data/notebooks/Export_Table_ACLs.py Outdated

@mrchristine mrchristine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me, we need to sanitize some of the parameters and other code blocks to make the code generic.

tomidatabricks added 2 commits May 6, 2021 08:14
@tomidatabricks

Copy link
Copy Markdown
Contributor Author

I removed any mentions of my name or email address in examples in side notebooks or in the code.

Let's discuss the sanitization of code blocks and parameters.

I had some things in mind: E.g. making some of the methods to copy from and to DBFS and Workspace and
the notebook execution method more generic, and push it out of the TableACLsClient up into the Clusters
and db client, depending on fit - as those function can be reused in other contexts

@mrchristine mrchristine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Great first commit for this feature.

@mrchristine mrchristine merged commit 25ae3f5 into databrickslabs:master May 10, 2021
jsparhamii pushed a commit to jsparhamii/migrate that referenced this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants