Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ingest): remove dbt delete_tests_as_datasets option #5865

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions metadata-ingestion/src/datahub/ingestion/source/dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,6 @@ class DBTConfig(StatefulIngestionConfigBase):
default=None,
description="When fetching manifest files from s3, configuration for aws connection details",
)
delete_tests_as_datasets: bool = Field(
False,
description="Prior to version 0.8.38, dbt tests were represented as datasets. If you ingested dbt tests before, set this flag to True (just needed once) to soft-delete tests that were generated as datasets by previous ingestion.",
)
backcompat_skip_source_on_lineage_edge: bool = Field(
False,
description="Prior to version 0.8.41, lineage edges to sources were directed to the target platform node rather than the dbt source node. This contradicted the established pattern for other lineage edges to point to upstream dbt nodes. To revert lineage logic to this legacy approach, set this flag to true.",
Expand Down Expand Up @@ -1440,35 +1436,6 @@ def string_map(input_map: Dict[str, Any]) -> Dict[str, str]:
self.report.report_workunit(wu)
yield wu

if self.config.delete_tests_as_datasets:
mce_platform = (
self.config.target_platform
if self.config.disable_dbt_node_creation
else DBT_PLATFORM
)
node_datahub_urn = get_urn_from_dbtNode(
node.database,
node.schema,
node.alias or node.name, # previous code used the alias
mce_platform,
self.config.env,
self.config.platform_instance
if mce_platform == DBT_PLATFORM
else None,
)
soft_delete_mcp = MetadataChangeProposalWrapper(
entityType="dataset",
changeType=ChangeTypeClass.UPSERT,
entityUrn=node_datahub_urn,
aspectName="status",
aspect=StatusClass(removed=True),
)
soft_delete_wu = MetadataWorkUnit(
id=f"{node_datahub_urn}-status", mcp=soft_delete_mcp
)
self.report.report_workunit(soft_delete_wu)
yield soft_delete_wu

# create workunits from dbt nodes
def get_workunits(self) -> Iterable[MetadataWorkUnit]:
if self.config.write_semantics == "PATCH" and not self.ctx.graph:
Expand Down
Loading