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 hashes)

Uploaded Python 3

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