Provider requires modification of Airflow Config

I am working on a jdbc dag using the provider hook for jdbc. I want the driver class and driver path to be stored in the airflow connection, but looking at the functions driver_class and driver_path if i don’t specify a specific override in the airflow config it won’t pull from the connection. My understanding is we are not able to use the airflow config in Astronomer. Am I understanding something wrong here?

Docs: https://github.com/apache/airflow/blob/main/airflow/providers/jdbc/hooks/jdbc.py

Hey @Tgoad

Every config that can be defined in the Airflow config can also be declared as an environment variable. For example, in this case you can use AIRFLOW__PROVIDERS_JDBC__ALLOW_DRIVER_CLASS_IN_EXTRA=true and AIRFLOW__PROVIDERS_JDBC__ALLOW_DRIVER_PATH_IN_EXTRA=true as indicated in the documentation.

If you are an Astronomer customer, you can easily set these values via Cloud UI.

Please let us know if this works.

Thanks
Manmeet

interesting, thank you!

1 Like