chore(ingestion/file-based lineage): update from com.linkedin.pegasus2avro.dataset to datahub.metadata.schema_classes (#14690)

This commit is contained in:
Jonny Dixon 2025-09-08 08:20:07 +01:00 committed by GitHub
parent 55817d14b8
commit f8a95b0ade
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,9 +37,9 @@ from datahub.ingestion.api.source_helpers import (
from datahub.ingestion.api.workunit import MetadataWorkUnit from datahub.ingestion.api.workunit import MetadataWorkUnit
from datahub.ingestion.graph.client import get_default_graph from datahub.ingestion.graph.client import get_default_graph
from datahub.ingestion.graph.config import ClientMode from datahub.ingestion.graph.config import ClientMode
from datahub.metadata.com.linkedin.pegasus2avro.dataset import ( from datahub.metadata.schema_classes import (
FineGrainedLineageDownstreamType, FineGrainedLineageDownstreamTypeClass,
FineGrainedLineageUpstreamType, FineGrainedLineageUpstreamTypeClass,
) )
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -80,9 +80,9 @@ class FineGrainedLineageConfig(ConfigModel):
@validator("upstreamType") @validator("upstreamType")
def upstream_type_must_be_supported(cls, v: str) -> str: def upstream_type_must_be_supported(cls, v: str) -> str:
allowed_types = [ allowed_types = [
FineGrainedLineageUpstreamType.FIELD_SET, FineGrainedLineageUpstreamTypeClass.FIELD_SET,
FineGrainedLineageUpstreamType.DATASET, FineGrainedLineageUpstreamTypeClass.DATASET,
FineGrainedLineageUpstreamType.NONE, FineGrainedLineageUpstreamTypeClass.NONE,
] ]
if v not in allowed_types: if v not in allowed_types:
raise ValueError( raise ValueError(
@ -93,8 +93,8 @@ class FineGrainedLineageConfig(ConfigModel):
@validator("downstreamType") @validator("downstreamType")
def downstream_type_must_be_supported(cls, v: str) -> str: def downstream_type_must_be_supported(cls, v: str) -> str:
allowed_types = [ allowed_types = [
FineGrainedLineageDownstreamType.FIELD_SET, FineGrainedLineageDownstreamTypeClass.FIELD_SET,
FineGrainedLineageDownstreamType.FIELD, FineGrainedLineageDownstreamTypeClass.FIELD,
] ]
if v not in allowed_types: if v not in allowed_types:
raise ValueError( raise ValueError(