Skip to content

Commit 93ff8f5

Browse files
anshbansalyoonhyejin
authored andcommitted
fix(mock-data): properly add run id (#14432)
1 parent c3f2f8e commit 93ff8f5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

metadata-ingestion/src/datahub/ingestion/source/mock_data/datahub_mock_data.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import logging
2-
from typing import Dict, Iterable, List, Optional, Tuple
2+
from typing import Dict, Iterable, List, Optional, Tuple, Union
33

44
from pydantic import Field
55

@@ -14,6 +14,7 @@
1414
support_status,
1515
)
1616
from datahub.ingestion.api.source import Source, SourceReport, StructuredLogCategory
17+
from datahub.ingestion.api.source_helpers import AutoSystemMetadata, auto_workunit
1718
from datahub.ingestion.api.workunit import MetadataWorkUnit
1819
from datahub.ingestion.source.common.subtypes import DatasetSubTypes
1920
from datahub.ingestion.source.mock_data.datahub_mock_data_report import (
@@ -31,6 +32,7 @@
3132
UpstreamClass,
3233
UpstreamLineageClass,
3334
)
35+
from datahub.sdk.entity import Entity
3436
from datahub.utilities.str_enum import StrEnum
3537

3638
logger = logging.getLogger(__name__)
@@ -165,6 +167,14 @@ def __init__(self, ctx: PipelineContext, config: DataHubMockDataConfig):
165167
self.report = DataHubMockDataReport()
166168

167169
def get_workunits(self) -> Iterable[MetadataWorkUnit]:
170+
workunit_processors = [AutoSystemMetadata(self.ctx).stamp]
171+
return self._apply_workunit_processors(
172+
workunit_processors, auto_workunit(self.get_workunits_internal())
173+
)
174+
175+
def get_workunits_internal(
176+
self,
177+
) -> Iterable[Union[MetadataWorkUnit, MetadataChangeProposalWrapper, Entity]]:
168178
# We don't want any implicit aspects to be produced
169179
# so we are not using get_workunits_internal
170180

0 commit comments

Comments
 (0)