unitycatalog-migrate


Nameunitycatalog-migrate JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryMigrate catalogs from Databricks to Unity Catalog
upload_time2025-01-27 10:48:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2025 Daniël Tom Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords databricks migration unitycatalog
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![test](https://github.com/dan1elt0m/unitycatalog-migrate/actions/workflows/test.yml/badge.svg)](https://github.com/dan1elt0m/unitycatalog-migrate/actions/workflows/test.yml)
![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fdan1elt0m%2Funitycatalog-migrate%2Fmain%2Fpyproject.toml)

# Unity Catalog Migrate
> **Disclaimer: This project is unofficial and not affiliated with or endorsed by the official Unity Catalog team.**

Migrate catalogs, schemas, and tables from Databricks to Unity Catalog.

## Requirements

- Python 3.9 or higher
- Databricks configuration file: https://docs.databricks.com/en/dev-tools/auth/config-profiles.html 

## Installation

To install the Unity Catalog Migrator, you can use the following commands:

```shell
pip install unitycatalog-migrate
```

## Usage

### Migrate Catalogs
```shell
ucm migrate-catalog NAMES... --profile <databricks-profile> 
```

### Migrate Schemas
```shell
ucm migrate-schema FULL_NAMES... --profile <databricks-profile> 
```
where FULL_NAMES are in the format `catalog.schema`

### Migrate Tables
```shell
ucm migrate-table FULL_NAMES..  --profile <databricks-profile>  
```
where FULL_NAMES are in the format `catalog.schema.table`

## Configuration

The Unity Catalog Migrator uses the following environment variables:
- UC_HOST_URL: The URL of the Unity Catalog server. Default is `http://localhost:8080/api/2.1/unity-catalog`.
- UC_TOKEN: The token to authenticate with the Unity Catalog server. Default is `None`. You can also pass the token as
    an argument to the command.

## Example
```shell
# Use Databricks CLI to get tables 
table_names=$(databricks tables list catalog1 schema1 --profile DATABRICKS_TEST | awk 'NR>1 {print $1}' | paste -sd ' ' -)

# Migrate the tables to Unity Catalog using ucm
echo $table_names | xargs ucm migrate-table --profile DATABRICKS_TEST 
```

## Remarks
- Catalog and Schema need to exist in Unity Catalog before migrating tables

### Not supported:
- system tables 
- Variant datatype

## Contributing
- Contributions are welcome. Please fork and make a PR and I'll take a look asap.
- Star the repo if you like it.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "unitycatalog-migrate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "databricks, migration, unitycatalog",
    "author": null,
    "author_email": "Dani\u00ebl Tom <d.e.tom89@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a2/c3/acf1e87417c73715b0ba03c58f8314b41f8d8d981eeec1f9f2f1df3e5f3b/unitycatalog_migrate-0.1.1.tar.gz",
    "platform": null,
    "description": "[![test](https://github.com/dan1elt0m/unitycatalog-migrate/actions/workflows/test.yml/badge.svg)](https://github.com/dan1elt0m/unitycatalog-migrate/actions/workflows/test.yml)\n![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fdan1elt0m%2Funitycatalog-migrate%2Fmain%2Fpyproject.toml)\n\n# Unity Catalog Migrate\n> **Disclaimer: This project is unofficial and not affiliated with or endorsed by the official Unity Catalog team.**\n\nMigrate catalogs, schemas, and tables from Databricks to Unity Catalog.\n\n## Requirements\n\n- Python 3.9 or higher\n- Databricks configuration file: https://docs.databricks.com/en/dev-tools/auth/config-profiles.html \n\n## Installation\n\nTo install the Unity Catalog Migrator, you can use the following commands:\n\n```shell\npip install unitycatalog-migrate\n```\n\n## Usage\n\n### Migrate Catalogs\n```shell\nucm migrate-catalog NAMES... --profile <databricks-profile> \n```\n\n### Migrate Schemas\n```shell\nucm migrate-schema FULL_NAMES... --profile <databricks-profile> \n```\nwhere FULL_NAMES are in the format `catalog.schema`\n\n### Migrate Tables\n```shell\nucm migrate-table FULL_NAMES..  --profile <databricks-profile>  \n```\nwhere FULL_NAMES are in the format `catalog.schema.table`\n\n## Configuration\n\nThe Unity Catalog Migrator uses the following environment variables:\n- UC_HOST_URL: The URL of the Unity Catalog server. Default is `http://localhost:8080/api/2.1/unity-catalog`.\n- UC_TOKEN: The token to authenticate with the Unity Catalog server. Default is `None`. You can also pass the token as\n    an argument to the command.\n\n## Example\n```shell\n# Use Databricks CLI to get tables \ntable_names=$(databricks tables list catalog1 schema1 --profile DATABRICKS_TEST | awk 'NR>1 {print $1}' | paste -sd ' ' -)\n\n# Migrate the tables to Unity Catalog using ucm\necho $table_names | xargs ucm migrate-table --profile DATABRICKS_TEST \n```\n\n## Remarks\n- Catalog and Schema need to exist in Unity Catalog before migrating tables\n\n### Not supported:\n- system tables \n- Variant datatype\n\n## Contributing\n- Contributions are welcome. Please fork and make a PR and I'll take a look asap.\n- Star the repo if you like it.\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Dani\u00ebl Tom\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Migrate catalogs from Databricks to Unity Catalog",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [
        "databricks",
        " migration",
        " unitycatalog"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7fe1ed8492115c31f2b896be02dc9dfc99ea01f08e083e64741599f5d929b793",
                "md5": "80870816ae62b614d46629145be52150",
                "sha256": "329a5a99f704df18aa4b5e4ae9493116326c0f444b9a1fb128b0c782b25ffe12"
            },
            "downloads": -1,
            "filename": "unitycatalog_migrate-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80870816ae62b614d46629145be52150",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7544,
            "upload_time": "2025-01-27T10:48:30",
            "upload_time_iso_8601": "2025-01-27T10:48:30.073079Z",
            "url": "https://files.pythonhosted.org/packages/7f/e1/ed8492115c31f2b896be02dc9dfc99ea01f08e083e64741599f5d929b793/unitycatalog_migrate-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a2c3acf1e87417c73715b0ba03c58f8314b41f8d8d981eeec1f9f2f1df3e5f3b",
                "md5": "f86fd22dfce544e2ba085eb6ca49367f",
                "sha256": "e2a5e81fec8692c5008271b90f5c893b7a7e6bd6f2fd3f999125ec73558b3a12"
            },
            "downloads": -1,
            "filename": "unitycatalog_migrate-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f86fd22dfce544e2ba085eb6ca49367f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 83990,
            "upload_time": "2025-01-27T10:48:31",
            "upload_time_iso_8601": "2025-01-27T10:48:31.889363Z",
            "url": "https://files.pythonhosted.org/packages/a2/c3/acf1e87417c73715b0ba03c58f8314b41f8d8d981eeec1f9f2f1df3e5f3b/unitycatalog_migrate-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-27 10:48:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "unitycatalog-migrate"
}
        
Elapsed time: 1.49421s