-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create SQLAlchemy engine from connection in DB Hook and added autocom…
…mit param to insert_rows method (#40669) * refactor: Refactored get_sqlalchemy_engine method of DbApiHook to use the get_conn result to build the sqlalchemy engine * refactor: Added autocommit parameter to insert_rows just like with the run method as this parameter will also be needed once whe have the SQLInsertRowsOperator * refactor: Updated the docstring of the insert_rows method * refactor: Updated sql.pyi * refactor: Try to fix AttributeError: type object 'SkipDBTestsSession' has no attribute 'get_bind' * refactor: Implemented the sqlalchemy_url property for JdbcHook * refactor: Refactored get_sqlalchemy_engine in DbApiHook, if Hook implements the sqlalchemy_url property then use it, otherwise fallback to original implementation with get_uri * refactor: Added SQLAlchemy Inspector property in DbApiHook * refactor: Reformated test_sqlalchemy_url_with_sqlalchemy_scheme in TestJdbcHook * refactor: Fixed static checks in DbApiHook * refactor: Fixed some static checks * docs: Updated docstring of JdbcHook and mentioned importance of sqlalchemy_scheme parameter --------- Co-authored-by: David Blain <david.blain@infrabel.be>
- Loading branch information
1 parent
1def3f1
commit f6c7388
Showing
5 changed files
with
74 additions
and
6 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