From a5a8b82ebea4c2ae7c0ffa6ee40ffbf39a5b1e87 Mon Sep 17 00:00:00 2001 From: Vamshi Kolanu Date: Mon, 8 Apr 2024 09:39:36 -0700 Subject: [PATCH] Removing logging from tracking adapter when disabled --- dbt/adapters/hive/cloudera_tracking.py | 5 ----- tests/conftest.py | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dbt/adapters/hive/cloudera_tracking.py b/dbt/adapters/hive/cloudera_tracking.py index a9bd69f..4034558 100644 --- a/dbt/adapters/hive/cloudera_tracking.py +++ b/dbt/adapters/hive/cloudera_tracking.py @@ -200,13 +200,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/tests/conftest.py b/tests/conftest.py index 4a5b26f..e61b028 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -82,6 +82,7 @@ def dwx_target(): "user": os.getenv("DBT_HIVE_USER"), "password": os.getenv("DBT_HIVE_PASSWORD"), "http_path": os.getenv("DBT_HIVE_HTTP_PATH") or "cliservice", + "usage_tracking": False, }