-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Labels
enhancementNew feature or requestNew feature or requesttriage-neededItems need to be reviewed / assigned to milestoneItems need to be reviewed / assigned to milestone
Description
Description
Currently, cosmos profile mappings are not user friendly. For example, Snowflake has 4 different classes for different auth methods. If a user changes their conn to use a different auth method, DAG code needs to be updated
Use case/motivation
To align with Airflow's connection paradigm, I propose consolidating to a single ProfileMapping class per database. The implementation could attempt to import the relevant hook from the provider mocked example below
try:
from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
return SnowflakeHook(snowflake_conn_id=conn_id).get_connection()
except ImportNotFound:
# factory that returns our custom classes based on the conn details
We could leave the existing classes unchanged, but this allows us to offload auth to the provider packages and play less catchup
Related issues
Example of cosmos team needing to maintain parity with snowflake provider: #1798
Are you willing to submit a PR?
- Yes, I am willing to submit a PR!
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttriage-neededItems need to be reviewed / assigned to milestoneItems need to be reviewed / assigned to milestone