mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 09:22:14 +00:00
Fixed entity reference for dbt and glue (#10201)
* fixed entity ref for dbt * fixed entity ref for glue
This commit is contained in:
parent
8ad27eb0a6
commit
a5d51d0f55
@ -53,6 +53,7 @@ from metadata.generated.schema.tests.testDefinition import (
|
|||||||
TestPlatform,
|
TestPlatform,
|
||||||
)
|
)
|
||||||
from metadata.generated.schema.tests.testSuite import TestSuite
|
from metadata.generated.schema.tests.testSuite import TestSuite
|
||||||
|
from metadata.generated.schema.type.basic import FullyQualifiedEntityName
|
||||||
from metadata.generated.schema.type.entityLineage import EntitiesEdge
|
from metadata.generated.schema.type.entityLineage import EntitiesEdge
|
||||||
from metadata.generated.schema.type.entityReference import EntityReference
|
from metadata.generated.schema.type.entityReference import EntityReference
|
||||||
from metadata.generated.schema.type.tagLabel import (
|
from metadata.generated.schema.type.tagLabel import (
|
||||||
@ -781,20 +782,11 @@ class DbtSource(DbtServiceSource): # pylint: disable=too-many-public-methods
|
|||||||
yield CreateTestCaseRequest(
|
yield CreateTestCaseRequest(
|
||||||
name=manifest_node.name,
|
name=manifest_node.name,
|
||||||
description=manifest_node.description,
|
description=manifest_node.description,
|
||||||
testDefinition=EntityReference(
|
testDefinition=FullyQualifiedEntityName(
|
||||||
id=self.metadata.get_by_name(
|
__root__=manifest_node.name
|
||||||
fqn=manifest_node.name,
|
|
||||||
entity=TestDefinition,
|
|
||||||
).id.__root__,
|
|
||||||
type="testDefinition",
|
|
||||||
),
|
),
|
||||||
entityLink=entity_link,
|
entityLink=entity_link,
|
||||||
testSuite=EntityReference(
|
testSuite=FullyQualifiedEntityName(__root__=test_suite_name),
|
||||||
id=self.metadata.get_by_name(
|
|
||||||
fqn=test_suite_name, entity=TestSuite
|
|
||||||
).id.__root__,
|
|
||||||
type="testSuite",
|
|
||||||
),
|
|
||||||
parameterValues=self.create_test_case_parameter_values(
|
parameterValues=self.create_test_case_parameter_values(
|
||||||
dbt_test
|
dbt_test
|
||||||
),
|
),
|
||||||
|
@ -37,6 +37,7 @@ from metadata.generated.schema.metadataIngestion.databaseServiceMetadataPipeline
|
|||||||
from metadata.generated.schema.metadataIngestion.workflow import (
|
from metadata.generated.schema.metadataIngestion.workflow import (
|
||||||
Source as WorkflowSource,
|
Source as WorkflowSource,
|
||||||
)
|
)
|
||||||
|
from metadata.generated.schema.type.entityReference import EntityReference
|
||||||
from metadata.ingestion.api.source import InvalidSourceException, SourceStatus
|
from metadata.ingestion.api.source import InvalidSourceException, SourceStatus
|
||||||
from metadata.ingestion.models.ometa_classification import OMetaTagAndClassification
|
from metadata.ingestion.models.ometa_classification import OMetaTagAndClassification
|
||||||
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
||||||
@ -308,7 +309,9 @@ class GlueSource(DatabaseServiceSource):
|
|||||||
path=table["StorageDescriptor"]["Location"],
|
path=table["StorageDescriptor"]["Location"],
|
||||||
description=table.get("Description", ""),
|
description=table.get("Description", ""),
|
||||||
locationType=location_type,
|
locationType=location_type,
|
||||||
service=self.context.storage_service.fullyQualifiedName,
|
service=EntityReference(
|
||||||
|
id=self.context.storage_service.id, type="storageService"
|
||||||
|
),
|
||||||
)
|
)
|
||||||
yield location_request
|
yield location_request
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user