diff --git a/CHANGELOG.md b/CHANGELOG.md index d98f22d..ca9ae6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,15 @@ ### 1.6.0 #### Features: -- Added support for [`dbt-core version 1.6.0`](https://github.com/dbt-labs/dbt-core/discussions/7958) according to DBT guidelines. -- new `clone` command -- Droped support for Python 3.7 +- Added support for [`dbt-core version 1.6.0`](https://github.com/dbt-labs/dbt-core/discussions/7958) according to DBT guidelines. +- Added support of oAuth authentication. +- New `clone` command. +- Droped support for Python 3.7. #### Fixes: -- ensure support for revamped `dbt debug` -- new limit arg for `adapter.execute()` +- Ensure support for revamped `dbt debug`. +- New limit arg for `adapter.execute()` +- Configuring composite unique key for incremental merge or insert+update strategy - Added new functional tests and parameterize them by overriding fixtures: - TestIncrementalConstraintsRollback - TestTableContractSqlHeader diff --git a/README.md b/README.md index c79d19f..a4dee00 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ For more information on using dbt with Vertica, consult the [Vertica-Setup](http ## dbt-vertica Versions Tested dbt-vertica has been developed using the following software and versions: -* Vertica Server 12.0.3-0 +* Vertica Server 23.4.0-0 * Python 3.11 * vertica-python client 1.3.1 -* dbt-core 1.5.0 -* dbt-tests-adapter 1.5.0 +* dbt-core 1.6.0 +* dbt-tests-adapter 1.6.0 ## Supported Features ### dbt Core Features @@ -56,6 +56,7 @@ your-profile: username: [your username] password: [your password] database: [database name] + oauth_access_token: [access token] schema: [dbt schema] connection_load_balance: True backup_server_node: [list of backup hostnames or IPs] @@ -74,6 +75,7 @@ your-profile: | username | The username to use to connect to the server. | Yes | None | dbadmin | | password | The password to use for authenticating to the server. | Yes | None | my_password | | database | The name of the database running on the server. | Yes | None | my_db | +| oauth_access_token | To authenticate via OAuth, provide an OAuth Access Token that authorizes a user to the database. | No | "" | Default: "" | | schema | The schema to build models into. | No | None | VMart | | connection_load_balance | A Boolean value that indicates whether the connection can be redirected to a host in the database other than host. | No | true | true | | backup_server_node | List of hosts to connect to if the primary host specified in the connection (host, port) is unreachable. Each item in the list should be either a host string (using default port 5433) or a (host, port) tuple. A host can be a host name or an IP address. | No | none | ['123.123.123.123','www.abc.com',('123.123.123.124',5433)] diff --git a/dbt/adapters/vertica/connections.py b/dbt/adapters/vertica/connections.py index 77d4b36..1bea228 100644 --- a/dbt/adapters/vertica/connections.py +++ b/dbt/adapters/vertica/connections.py @@ -46,6 +46,7 @@ class verticaCredentials(Credentials): ssl: bool = False port: int = 5433 timeout: int = 3600 + oauth_access_token: str = "" withMaterialization: bool = False ssl_env_cafile: Optional[str] = None ssl_uri: Optional[str] = None @@ -97,7 +98,7 @@ def open(cls, connection): 'connection_load_balance':credentials.connection_load_balance, 'session_label': f'dbt_{credentials.username}', 'retries': credentials.retries, - + 'oauth_access_token': credentials.oauth_access_token, 'backup_server_node':credentials.backup_server_node, } diff --git a/dbt/include/vertica/profile_template.yml b/dbt/include/vertica/profile_template.yml index e970ac2..7868659 100644 --- a/dbt/include/vertica/profile_template.yml +++ b/dbt/include/vertica/profile_template.yml @@ -8,6 +8,9 @@ prompts: type: 'int' username: hint: 'dev username' + oauth_access_token: + hint: 'access token' + default: '' password: hint: 'dev password' hide_input: true diff --git a/dbt/include/vertica/sample_profiles.yml b/dbt/include/vertica/sample_profiles.yml index e230312..38e5267 100644 --- a/dbt/include/vertica/sample_profiles.yml +++ b/dbt/include/vertica/sample_profiles.yml @@ -7,6 +7,7 @@ default: username: [dev_username] password: [dev_password] database: [dbname] + oauth_access_token: [access token] schema: [dev_schema] threads: [1 or more] connection_load_balance: [True or False] @@ -19,6 +20,7 @@ default: username: [prod_username] password: [prod_password] database: [dbname] + oauth_access_token: [access token] schema: [prod_schema] threads: [1 or more] connection_load_balance: [True or False]