Skip to main content

Ingestion Framework for OpenMetadata

Project description

logo

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

idg_metadata_client-1.0.2.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file idg_metadata_client-1.0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for idg_metadata_client-1.0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edce5f78467a05785b5fa2a143244a058cb9e8d8d4b89839d60a8084b0f1bb83
MD5 9794dd27b7694bb7a0988c528f5d6383
BLAKE2b-256 806ed574a9bec94d4e04103c2ca199e3b218305921e1da841a12317f672fd883

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page