Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 authored and francescomucio committed Jul 26, 2022
1 parent a8e4302 commit d39b0a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
8 changes: 3 additions & 5 deletions dbt/adapters/spark/connections.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os

from contextlib import contextmanager

import dbt.exceptions
Expand All @@ -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
Expand Down Expand Up @@ -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()}
Expand Down

0 comments on commit d39b0a3

Please sign in to comment.