Registry / data / datahub

datahub

JSON →
library0.999.1pypypi✓ verified 85d ago

DataHub is an open-source metadata platform for the modern data stack. The Python client (acryl-datahub) provides utilities for ingesting metadata, interacting with the DataHub API, and managing data lineage. As of version 0.12.1, the package has transitioned from 'datahub' to 'acryl-datahub' on PyPI. The dummy package 'datahub' 0.999.1 is a placeholder and should be avoided in favor of 'acryl-datahub'.

pip install acryl-datahub
INSTALL
IMPORT
SIG · DATAHUB
D
datahub
datapythonv0.999.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DataHubRestEmitter
from datahub.emitter.rest_emitter import DataHubRestEmitter
from datahub import DataHubRestEmitter
The recommended import path uses the emitter submodule.
DataHubGraph
from datahub.ingestion.graph.client import DataHubGraph
from datahub.graph import DataHubGraph
The correct module is datahub.ingestion.graph.client.

Quickstart: Emit a dataset metadata change event.

import os from datahub.emitter.rest_emitter import DataHubRestEmitter from datahub.metadata.schema_classes import DatasetPropertiesClass # Create an emitter to DataHub server = os.environ.get('DATAHUB_SERVER', 'http://localhost:8080') token = os.environ.get('DATAHUB_TOKEN', '') emitter = DataHubRestEmitter(gms_server=server, token=token) # Emit a dataset metadata change emitter.emit_mcp( entity_urn='urn:li:dataset:(urn:li:dataPlatform:hive,test_dataset,PROD)', aspect=DatasetPropertiesClass(description='Test dataset') ) print('Metadata emitted successfully')
datahub --version
Debug
Known issues
deprecatedThe 'datahub' package on PyPI (version 0.999.1) is a dummy placeholder. Install 'acryl-datahub' instead.
fix
Run: pip uninstall datahub && pip install acryl-datahub
affects: >=0.999.1
breakingIn older versions (pre-0.9.0), the import paths were different. The emitter was at 'datahub.emitter.rest_emitter' but now uses async/await patterns.
fix
Upgrade to latest acryl-datahub and use new import paths.
affects: <0.9.0
gotchaWhen using the emitters, ensure you call .emit() correctly. The synchronous emitter no longer exists; use async or use DataHubRestEmitter which is synchronous.
fix
Use DataHubRestEmitter for synchronous emits or use the async emitter with event loop.
affects: >=0.9.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'datahub'
The 'datahub' dummy package is not installed or is the wrong package.
fix
pip install acryl-datahub
ImportError: cannot import name 'DataHubRestEmitter' from 'datahub'
The import path changed or the wrong package is installed.
fix
Install acryl-datahub and use from datahub.emitter.rest_emitter import DataHubRestEmitter
AttributeError: module 'datahub' has no attribute 'emitter'
Using the dummy package or an outdated version.
fix
pip install --upgrade acryl-datahub
Upgrade
Version history
0.999.1latest on PyPI · released Mar 25, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
2
Resources
datahub — pip install datahub · libregistry