-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Description
Apache Airflow Provider(s)
databricks
Versions of Apache Airflow Providers
apache-airflow-providers-databricks==7.7.4
Apache Airflow version
Tested on both latest AF2 and 3
Operating System
ubuntu
Deployment
Astronomer
Deployment details
No response
What happened
databricks-sql-connector==4.2.0 released Friday November 14th introduced changes to commit/autocommit properties on Databricks Connection object (databricks/databricks-sql-python#704). Because of that changes, when using Databricks operator like DatabricksSqlOperator I'm receiving an error: databricks.sql.exc.TransactionError: Failed to set autocommit to False: [CONFIG_NOT_AVAILABLE] Configuration AUTOCOMMIT is not available. SQLSTATE: 42K0I. Regardless of whether I try to use autocommit=False or True, the problem is that the Databricks is not accepting setting this config with SQL query. The Base DbApiHook set_autocomit method is setting the autocommit on dbx conn object, before it did not have this property so it passed and was ignored, but now that's implemented, it started to fail.
What you think should happen instead
I should be able to execute query on DBX without errors.
How to reproduce
Run any query with DatabricksSqlOperator and databricks-sql-connector==4.2.0.
Anything else
Not sure if the problem is within my DBX instance, if we should somehow work around this in Airflow or maybe the changes to databricks connection are to be adjusted.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct