Skip to content

[Feature] Snowflake Key Pair authentication #147

@andreaslang

Description

@andreaslang

Snowflake allows for private key authentication, which tends to be preferred for service users over password based authentication.

I am fairly certain that allowing this via the existing connection mechanism could be easily done by expanding the following to include private_key in conn_extra_params:

class DbtSnowflakeHook(DbtHook):
    """A hook to interact with dbt using a Snowflake connection."""

    conn_type = "snowflake"
    hook_name = "dbt Snowflake Hook"
    conn_params = [
        DbtConnectionParam("conn_type", "type", "postgres"),
        "host",
        "schema",
        DbtConnectionParam("login", "user"),
        "password",
    ]
    conn_extra_params = [
        "account",
        "role",
        "database",
        "warehouse",
        "threads",
        "client_session_keep_alive",
        "query_tag",
        "connect_retries",
        "connect_timeout",
        "retry_on_database_errors",
        "retry_all",
    ]

Happy to create a PR if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions