Skip to content

Commit 5900271

Browse files
committed
Add log info when waiting for cache
1 parent 006a9c8 commit 5900271

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_schema_gen.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ def __init__(
186186
config, self.data_dictionary, self.report, identifiers
187187
)
188188
self.profiler: Optional[SnowflakeProfiler] = profiler
189-
self.snowsight_url_builder: Optional[SnowsightUrlBuilder] = (
190-
snowsight_url_builder
191-
)
189+
self.snowsight_url_builder: Optional[
190+
SnowsightUrlBuilder
191+
] = snowsight_url_builder
192192

193193
# These are populated as side-effects of get_workunits_internal.
194194
self.databases: List[SnowflakeDatabase] = []
@@ -213,6 +213,9 @@ def get_workunits_internal(self) -> Iterable[MetadataWorkUnit]:
213213
logger.info("Creating structured property templates for tags")
214214
yield from self.tag_extractor.create_structured_property_templates()
215215
# We have to wait until cache invalidates to make sure the structured property template is available
216+
self.logger.info(
217+
f"Waiting for {self.config.structured_properties_template_cache_invalidation_interval} seconds for structured properties cache to invalidate"
218+
)
216219
time.sleep(
217220
self.config.structured_properties_template_cache_invalidation_interval
218221
)
@@ -266,9 +269,9 @@ def get_databases(self) -> Optional[List[SnowflakeDatabase]]:
266269
)
267270
return None
268271
else:
269-
ischema_databases: List[SnowflakeDatabase] = (
270-
self.get_databases_from_ischema(databases)
271-
)
272+
ischema_databases: List[
273+
SnowflakeDatabase
274+
] = self.get_databases_from_ischema(databases)
272275

273276
if len(ischema_databases) == 0:
274277
self.structured_reporter.failure(

0 commit comments

Comments
 (0)