Ingestion Framework for OpenMetadata
Project description
Metadata Client
Metadata Ingestion is a simple framework to build connectors and ingest metadata of various systems through OpenMetadata APIs. It could be used in an orchestration framework(e.g. Apache Airflow) to ingest metadata.
Usage
Install the package:
pip install metadata-client
Setup a metadata client:
from metadata.ingestion.ometa.ometa_api import OpenMetadata
from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import OpenMetadataConnection
from metadata.generated.schema.security.client.openMetadataJWTClientConfig import OpenMetadataJWTClientConfig
server_config = OpenMetadataConnection(
hostPort="<metadata-server>/api",
authProvider="openmetadata",
securityConfig=OpenMetadataJWTClientConfig(
jwtToken="<your-token>"
),
)
client = OpenMetadata(server_config)
When developping in local (only), you may need to accept insecure transport (i.e. http).
This is NOT recommanded outside of local development environement, that is requesting localhost
.
import os
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
Quickstart
Create or update metadata classification:
# Create or update classification
classification_request = CreateClassificationRequest(
name="TestClassification",
displayName="TestClassification-2",
description="Sample classification: {}".format(uuid.uuid4()),
)
client.create_or_update(classification_request)
Documentation
Contributing
Before committing to this repository, you must have pre-commit installed, and install the following pre-commit hooks:
pre-commit install --install-hooks -t pre-commit -t pre-push
License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file idg_metadata_client-1.0.2.0-py3-none-any.whl
.
File metadata
- Download URL: idg_metadata_client-1.0.2.0-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edce5f78467a05785b5fa2a143244a058cb9e8d8d4b89839d60a8084b0f1bb83 |
|
MD5 | 9794dd27b7694bb7a0988c528f5d6383 |
|
BLAKE2b-256 | 806ed574a9bec94d4e04103c2ca199e3b218305921e1da841a12317f672fd883 |