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

feat(ingest): support deletion of containers in snowflake stateful in… #6180

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from snowflake.connector import SnowflakeConnection

from datahub.emitter.mce_builder import (
make_container_urn,
make_data_platform_urn,
make_dataplatform_instance_urn,
make_dataset_urn,
Expand Down Expand Up @@ -789,6 +790,14 @@ def add_table_to_schema_container(
container_key=schema_container_key,
dataset_urn=dataset_urn,
)

self.stale_entity_removal_handler.add_entity_to_state(
type="container",
urn=make_container_urn(
guid=schema_container_key.guid(),
),
)

for wu in container_workunits:
self.report.report_workunit(wu)
yield wu
Expand Down Expand Up @@ -838,6 +847,13 @@ def gen_database_containers(
domain_urn=domain_urn,
)

self.stale_entity_removal_handler.add_entity_to_state(
type="container",
urn=make_container_urn(
guid=database_container_key.guid(),
),
)

for wu in container_workunits:
self.report.report_workunit(wu)
yield wu
Expand Down