Snowflake connector "Unknown Hook Type"

Hi Folks,

I’m getting an “Unknown hook type” error when I try to run a test dag against Snowflake, pulling the connection URI from Azure Key Vault. Here is the relevant configuration info:

ENV VARS set in Astronomer UI:

AZURE_CLIENT_ID=****
AZURE_CLIENT_SECRET=****
AZURE_KEYVAULT_URL="https://<vault name>.vault.azure.net"
AZURE_TENANT_ID=****

ENV VARS set in Dockerfile:

ENV AIRFLOW__SECRETS__BACKEND="airflow.providers.microsoft.azure.secrets.azure_key_vault.AzureKeyVaultBackend"
ENV AIRFLOW__SECRETS__BACKEND_KWARGS='{"connections_prefix": "AIRFLOW-CONNECTIONS", "variables_prefix": "AIRFLOW-VARIABLES", "vault_url": $AZURE_KEYVAULT_URL}'

Connection URI stored in Azure Key Vault:

Secret Name: airflow-connections-snowflake-uri
Secret Value: snowflake_uri=snowflake://<username>:<password>@<host>:5432

In Dag:

conn_id='snowflake_uri'

For anyone else who has an issue my problem was actually the snowflake connection string. In addition to the login and password I was given a segment that looked like a host name, but was actually the account name. So instead of

Secret Value: snowflake_uri=snowflake://<username>:<password>@<host>:5432

I had to use

Secret Value: snowflake_uri=snowflake://<username>:<password>@?extra__snowflake__account=<account>