diff --git a/CHANGELOG.md b/CHANGELOG.md index c6f8c272f..7405e9e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ - Enhanced get_columns_in_relation method to handle a bug in open source deltalake which doesnt return schema details in `show table extended in databasename like '*'` query output. This impacts dbt snapshots if file format is open source deltalake ([#207](https://github.com/dbt-labs/dbt-spark/pull/207)) - Parse properly columns when there are struct fields to avoid considering inner fields: Issue ([#202](https://github.com/dbt-labs/dbt-spark/issues/202)) +### Under the hood +- Add `unique_field` to better understand adapter adoption in anonymous usage tracking ([#211](https://github.com/dbt-labs/dbt-spark/pull/211)) + ### Contributors - [@harryharanb](https://github.com/harryharanb) ([#207](https://github.com/dbt-labs/dbt-spark/pull/207)) - [@SCouto](https://github.com/Scouto) ([#204](https://github.com/dbt-labs/dbt-spark/pull/204)) diff --git a/dbt/adapters/spark/connections.py b/dbt/adapters/spark/connections.py index 7bf6d159a..41413f355 100644 --- a/dbt/adapters/spark/connections.py +++ b/dbt/adapters/spark/connections.py @@ -135,6 +135,10 @@ def __post_init__(self): def type(self): return 'spark' + @property + def unique_field(self): + return self.host + def _connection_keys(self): return ('host', 'port', 'cluster', 'endpoint', 'schema', 'organization') diff --git a/requirements.txt b/requirements.txt index 2541acfc5..cbe57414b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ dbt-core==0.21.0b2 PyHive[hive]>=0.6.0,<0.7.0 pyodbc>=4.0.30 sqlparams>=3.0.0 -thrift>=0.11.0,<0.12.0 +thrift>=0.13.0 +sqlparse>=0.4.2 # not directly required, pinned by Snyk to avoid a vulnerability