datahub/docs/lineage/sample_code.md

2.9 KiB

Lineage sample code

The following samples will cover emitting dataset-to-dataset, dataset-to-job-to-dataset, chart-to-dataset, dashboard-to-chart and job-to-dataflow lineages.

NOTE:

  • Emitting aspects as MetadataChangeProposalWrapper is recommended over emitting aspects via the MetadataChangeEvent.
  • Emitting any aspect associated with an entity completely overwrites the previous value of the aspect associated with the entity. This means that emitting a lineage aspect associated with a dataset will overwrite lineage edges that already exist.