mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-03 20:27:50 +00:00 
			
		
		
		
	chore(ingestion/file-based lineage): update from com.linkedin.pegasus2avro.dataset to datahub.metadata.schema_classes (#14690)
This commit is contained in:
		
							parent
							
								
									55817d14b8
								
							
						
					
					
						commit
						f8a95b0ade
					
				@ -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(
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user