diff --git a/dbt/adapters/impala/cloudera_tracking.py b/dbt/adapters/impala/cloudera_tracking.py index 56d0b50..58fbf0f 100644 --- a/dbt/adapters/impala/cloudera_tracking.py +++ b/dbt/adapters/impala/cloudera_tracking.py @@ -61,6 +61,12 @@ class TrackingEventType: warehouse_info = {"warehouse_version": {"version": "NA", "build": "NA"}} +def log_initial_message(): + logger.debug( + f"Usage tracking flag {usage_tracking}. To turn on/off use usage_tracking flag in profiles.yml" + ) + + def populate_platform_info(cred: Credentials, ver): """ populate platform info to be passed on for tracking @@ -200,13 +206,8 @@ def track_usage(tracking_payload): global usage_tracking - logger.debug( - f"Usage tracking flag {usage_tracking}. To turn on/off use usage_tracking flag in profiles.yml" - ) - # if usage_tracking is disabled, quit if not usage_tracking: - logger.debug(f"Skipping Event {tracking_payload}") return # fix the schema of tracking payload to be common for all events diff --git a/dbt/adapters/impala/connections.py b/dbt/adapters/impala/connections.py index 2d0f958..5f2f34a 100644 --- a/dbt/adapters/impala/connections.py +++ b/dbt/adapters/impala/connections.py @@ -89,6 +89,8 @@ def __post_init__(self): # set the usage tracking flag tracker.usage_tracking = self.usage_tracking + # log the initialization message once + tracker.log_initial_message() # get platform information for tracking tracker.populate_platform_info(self, ver) # get dbt deployment env information for tracking