-
Notifications
You must be signed in to change notification settings - Fork 3k
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
refactor(ingest): Refactoring container creation to common place #6877
refactor(ingest): Refactoring container creation to common place #6877
Conversation
Using auto-state handler in bigquery, sql-common and snowflake
Fix presto on hive container generation
# Conflicts: # metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_v2.py # metadata-ingestion/src/datahub/ingestion/source/sql/bigquery.py
platform=self.platform, | ||
domain_config=self.config.domain, | ||
domain_registry=self.domain_registry, | ||
platform_instance=self.config.platform_instance, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platform, platform_instance, env, and probably even database should all already be in the database_container_key - can we simplify these calls?
dataset, | ||
["Dataset"], | ||
database_container_key, | ||
yield from gen_schema_containers( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yield from gen_schema_containers( | |
yield from gen_schema_container( |
# Conflicts: # metadata-ingestion/src/datahub/ingestion/source/bigquery_v2/bigquery.py # metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_v2.py # metadata-ingestion/src/datahub/ingestion/source/sql/presto_on_hive.py # metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py
# Conflicts: # metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py
# Conflicts: # metadata-ingestion/src/datahub/ingestion/source/bigquery_v2/bigquery.py
if not env: | ||
env = config.env | ||
|
||
schema_container_key = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always overrides schema_container_key
- probably not what we want
assert platform | ||
|
||
if not platform_instance: | ||
platform_instance = config.platform_instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally remove platform, platform_instance, and env options - pull from the key_container instead
@@ -1299,40 +1212,18 @@ def gen_database_containers( | |||
else None, | |||
) | |||
|
|||
self.stale_entity_removal_handler.add_entity_to_state( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure to remove these in other places too
name=schema.name, | ||
description=schema.comment, | ||
schema=self.snowflake_identifier(schema.name), | ||
database=self.snowflake_identifier(db_name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still feels a bit annoying that we need to provide the name twice, but i guess we can fix in a later PR
Refactoring container creation to common place
Using auto-state handler in bigquery, sql-common and snowflake
Checklist