forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors in Databricks SQL operator introduced when refactoring
When SQLExecuteQueryOperator has been introduced in apache#25717, it introduced some errors in the Databricks SQL operator: * The schema (description) parameter has been passed as _process_output parameter from Hook's output * The run() method of DatabricksHook was not conforming to other run methods of the Hook - it was returning Tuple of the result/description * The _process_output type was not specified - if scalar was used it returned different output than without it and it was not specified in the DBApiHook. This PR fixes it by: * the Databricks Hook is now conformant to the other DBAPIHooks in terms of value returned by Hook (backwards incompatible so we need to bump major version of the provider) * the DBApiHook now has "last_description" field which on one hand makes it stateless, on the other, the state reflects the description of the last run method and is not a problem to keep. This implies 1.4 version of common-sql provider as this is a new feature for the provider * the DBApiHook now has "scalar_return_last" field that indicates if scalar output was specified. * Python dbapi's "description" is properly named now - previously it was "schema" which clashed with the "schema" name passed to hook initialisation - the actual database schema
- Loading branch information
Showing
8 changed files
with
78 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters