Apache Airflow version
2.11.0 (also reproduces on main, provider 7.19.0)
If "Other Airflow 2 version" selected, which one?
No response
What happened
Every call to DatabricksSqlHook.get_conn() (used by DatabricksSqlOperator, Databricks SQL sensors, etc.) logs this warning:
[WARN] Parameter '_user_agent_entry' is deprecated; use 'user_agent_entry' instead. This parameter will be removed in the upcoming releases.
Steps to reproduce:
- Set up a Databricks SQL connection.
- Run any task that opens a connection through
DatabricksSqlHook (e.g. DatabricksSqlOperator).
- Check the task log. The warning fires on every new connection.
Cause: databricks_sql.py builds connect_kwargs with the key _user_agent_entry (leading underscore) when calling sql.connect(). databricks-sql-connector's Session.__init__ only reads user_agent_entry directly; it falls back to _user_agent_entry for backward compatibility and logs the deprecation warning each time it's used.
What you think should happen instead
The hook should pass user_agent_entry (no underscore), the current parameter name. This isn't a behavior change: user_agent_entry has been supported by databricks-sql-connector for multiple releases, and the provider on main already pins databricks-sql-connector>=4.4.0, well above where the non-underscore parameter was introduced.
How to reproduce
See steps above.
Operating System
Any (reproduces regardless of OS)
Versions of Apache Airflow Providers
apache-airflow-providers-databricks==7.12.0
databricks-sql-connector==4.2.5
Deployment
Other
Deployment details
No response
Anything else
I have a one-line fix ready and will open a PR against this issue.
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
2.11.0 (also reproduces on
main, provider 7.19.0)If "Other Airflow 2 version" selected, which one?
No response
What happened
Every call to
DatabricksSqlHook.get_conn()(used byDatabricksSqlOperator, Databricks SQL sensors, etc.) logs this warning:Steps to reproduce:
DatabricksSqlHook(e.g.DatabricksSqlOperator).Cause:
databricks_sql.pybuildsconnect_kwargswith the key_user_agent_entry(leading underscore) when callingsql.connect().databricks-sql-connector'sSession.__init__only readsuser_agent_entrydirectly; it falls back to_user_agent_entryfor backward compatibility and logs the deprecation warning each time it's used.What you think should happen instead
The hook should pass
user_agent_entry(no underscore), the current parameter name. This isn't a behavior change:user_agent_entryhas been supported bydatabricks-sql-connectorfor multiple releases, and the provider onmainalready pinsdatabricks-sql-connector>=4.4.0, well above where the non-underscore parameter was introduced.How to reproduce
See steps above.
Operating System
Any (reproduces regardless of OS)
Versions of Apache Airflow Providers
apache-airflow-providers-databricks==7.12.0
databricks-sql-connector==4.2.5
Deployment
Other
Deployment details
No response
Anything else
I have a one-line fix ready and will open a PR against this issue.
Are you willing to submit PR?
Code of Conduct