uc-catalog-cloning is a powerful cloning script designed to streamline the process of creating a new catalog with an updated storage location. It facilitates the seamless cloning of all associated databases, managed tables, permission accesses, tags, and comments from the source catalog to the target catalog. For more information, see this blog post.
Follow these steps to make the most of this cloning script:
-
Installation:
- Ensure that you have the following Python libraries installed on Databricks:
If running the code from your local development system, also install the following library:
databricks-sdk==0.14.0 termcolor
databricks-connect==13.3.3
- Ensure that you have the following Python libraries installed on Databricks:
-
Import the
CloneCatalogClass:- Import the
CloneCatalogclass from theclonecatalogmodule in your Python script or Jupyter notebook.
from clonecatalog import CloneCatalog
- Import the
-
Instantiate the
CloneCatalogClass:
Create an instance of the CloneCatalog class with the necessary configuration parameters as illustrated in example.ipynb
cloning = CloneCatalog(
source_catalog_external_location_name,
source_catalog_name,
target_catalog_external_location_pre_req,
target_catalog_name,
schemas_locations_dict
)Replace the input arguments with your specific configuration details.
- Run the cloning:
Execute the cloning by calling the CloneCatalog instance.
cloning()Example Notebook:
For a hands-on example, refer to the provided Jupyter notebook in the repository example.ipynb.
Customize the cloning process by modifying the CloneCatalog class and its methods to suit your specific requirements.
If you encounter any issues or have questions, please check the project's issue tracker on GitHub or reach out to the community for support.
We welcome contributions from the open-source community to make this cloning script even more powerful and versatile. Please follow these guidelines:
- Fork the repository and create a feature branch for your contributions.
- Ensure that your code adheres to PEP 8 style guidelines.
- Write clear and concise documentation for your changes.
- Create tests for your code to maintain code quality.
- Submit a pull request for review.
Please see LICENSE