From d39b0a38c9e85ec1f42aa0c26407f3c3b89e8edb Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Thu, 30 Jun 2022 12:23:29 +0200 Subject: [PATCH] Revert #367 (#378) --- CHANGELOG.md | 3 +-- dbt/adapters/spark/connections.py | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 806980d75..eb59dc32c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,12 @@ - Handled inconsistent Bigint/Long datatype returned by Spark using `describe` and `show table extended`. ### Under the hood -- Add `DBT_INVOCATION_ENV` environment variable to ODBC user agent string ([#366](https://github.com/dbt-labs/dbt-spark/pull/366)) - Initialize lift + shift for cross-db macros ([#359](https://github.com/dbt-labs/dbt-spark/pull/359)) - Add invocation env to user agent string ([#367](https://github.com/dbt-labs/dbt-spark/pull/367)) - Use dispatch pattern for get_columns_in_relation_raw macro ([#365](https://github.com/dbt-labs/dbt-spark/pull/365)) ### Contributors -- [@ueshin](https://github.com/dbt-labs/dbt-spark/commits?author=ueshin) ([#365](https://github.com/dbt-labs/dbt-spark/pull/365)) +- [@ueshin](https://github.com/ueshin) ([#365](https://github.com/dbt-labs/dbt-spark/pull/365)) - [@dbeatty10](https://github.com/dbeatty10) ([#359](https://github.com/dbt-labs/dbt-spark/pull/359)) - [@francescomucio](https://github.com/francescomucio) ([#357](https://github.com/dbt-labs/dbt-spark/pull/357)) diff --git a/dbt/adapters/spark/connections.py b/dbt/adapters/spark/connections.py index 135463eb3..59ceb9dd8 100644 --- a/dbt/adapters/spark/connections.py +++ b/dbt/adapters/spark/connections.py @@ -1,5 +1,3 @@ -import os - from contextlib import contextmanager import dbt.exceptions @@ -9,7 +7,6 @@ from dbt.events import AdapterLogger from dbt.utils import DECIMALS from dbt.adapters.spark import __version__ -from dbt.tracking import DBT_INVOCATION_ENV try: from TCLIService.ttypes import TOperationState as ThriftState @@ -412,8 +409,9 @@ def open(cls, connection): cls.validate_creds(creds, required_fields) dbt_spark_version = __version__.version - dbt_invocation_env = os.getenv(DBT_INVOCATION_ENV) or "manual" - user_agent_entry = f"dbt-labs-dbt-spark/{dbt_spark_version} (Databricks, {dbt_invocation_env})" # noqa + user_agent_entry = ( + f"dbt-labs-dbt-spark/{dbt_spark_version} (Databricks)" # noqa + ) # http://simba.wpengine.com/products/Spark/doc/ODBC_InstallGuide/unix/content/odbc/hi/configuring/serverside.htm ssp = {f"SSP_{k}": f"{{{v}}}" for k, v in creds.server_side_parameters.items()}