mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-04 07:34:44 +00:00

Co-authored-by: Hyejin Yoon <hyejin.yoon@acryl.io> Co-authored-by: socar-dini <dini@socar.kr>
17 lines
481 B
Python
17 lines
481 B
Python
import datahub.emitter.mce_builder as builder
|
|
from datahub.emitter.rest_emitter import DatahubRestEmitter
|
|
|
|
# Construct a lineage object.
|
|
lineage_mce = builder.make_lineage_mce(
|
|
[
|
|
builder.make_dataset_urn("hive", "fct_users_deleted"), # Upstream
|
|
],
|
|
builder.make_dataset_urn("hive", "logging_events"), # Downstream
|
|
)
|
|
|
|
# Create an emitter to the GMS REST API.
|
|
emitter = DatahubRestEmitter("http://localhost:8080")
|
|
|
|
# Emit metadata!
|
|
emitter.emit_mce(lineage_mce)
|