Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: vertica profile username #688

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cosmos/profiles/vertica/user_pass.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
"""
Expand All @@ -18,7 +18,7 @@ class VerticaUserPasswordProfileMapping(BaseProfileMapping):

required_fields = [
"host",
"user",
"username",
"password",
"database",
"schema",
Expand All @@ -28,7 +28,7 @@ class VerticaUserPasswordProfileMapping(BaseProfileMapping):
]
airflow_param_mapping = {
"host": "host",
"user": "login",
"username": "login",
"password": "password",
"port": "port",
"schema": "schema",
Expand Down
6 changes: 3 additions & 3 deletions tests/profiles/vertica/test_vertica_user_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_connection_claiming() -> None:
# - conn_type == vertica
# and the following exist:
# - host
# - user
# - username
# - password
# - port
# - database or database
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Loading