diff --git a/cosmos/profiles/vertica/user_pass.py b/cosmos/profiles/vertica/user_pass.py index 494185e05..ccaaf301d 100644 --- a/cosmos/profiles/vertica/user_pass.py +++ b/cosmos/profiles/vertica/user_pass.py @@ -1,4 +1,4 @@ -"Maps Airflow Vertica connections using user + password authentication to dbt profiles." +"Maps Airflow Vertica connections using username + password authentication to dbt profiles." from __future__ import annotations from typing import Any @@ -8,7 +8,7 @@ class VerticaUserPasswordProfileMapping(BaseProfileMapping): """ - Maps Airflow Vertica connections using user + password authentication to dbt profiles. + Maps Airflow Vertica connections using username + password authentication to dbt profiles. https://docs.getdbt.com/reference/warehouse-setups/vertica-setup https://airflow.apache.org/docs/apache-airflow-providers-vertica/stable/connections/vertica.html """ @@ -18,7 +18,7 @@ class VerticaUserPasswordProfileMapping(BaseProfileMapping): required_fields = [ "host", - "user", + "username", "password", "database", "schema", @@ -28,7 +28,7 @@ class VerticaUserPasswordProfileMapping(BaseProfileMapping): ] airflow_param_mapping = { "host": "host", - "user": "login", + "username": "login", "password": "password", "port": "port", "schema": "schema", diff --git a/tests/profiles/vertica/test_vertica_user_pass.py b/tests/profiles/vertica/test_vertica_user_pass.py index 953a3c553..19771c799 100644 --- a/tests/profiles/vertica/test_vertica_user_pass.py +++ b/tests/profiles/vertica/test_vertica_user_pass.py @@ -59,7 +59,7 @@ def test_connection_claiming() -> None: # - conn_type == vertica # and the following exist: # - host - # - user + # - username # - password # - port # - database or database @@ -142,7 +142,7 @@ def test_profile_args( assert profile_mapping.profile == { "type": mock_vertica_conn.conn_type, "host": mock_vertica_conn.host, - "user": mock_vertica_conn.login, + "username": mock_vertica_conn.login, "password": "{{ env_var('COSMOS_CONN_VERTICA_PASSWORD') }}", "port": mock_vertica_conn.port, "schema": "my_schema", @@ -168,7 +168,7 @@ def test_profile_args_overrides( assert profile_mapping.profile == { "type": mock_vertica_conn.conn_type, "host": mock_vertica_conn.host, - "user": mock_vertica_conn.login, + "username": mock_vertica_conn.login, "password": "{{ env_var('COSMOS_CONN_VERTICA_PASSWORD') }}", "port": mock_vertica_conn.port, "database": "my_db_override",