-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Open
Labels
good first issuekind:metaHigh-level information important to the communityHigh-level information important to the communityprovider:apache-hiveprovider:apache-impalaprovider:common-sqlprovider:databricksprovider:exasolprovider:jdbcprovider:microsoft-mssqlprovider:mysqlprovider:postgresprovider:prestoprovider:sqliteprovider:trinoprovider:vertica
Description
Body
Original discussion: https://lists.apache.org/thread/8rhmz3qh30hvkondct4sfmgk4vd07mn5
tl;dr; DbApiHook assumes that Airflow Connection URI representation is a valid SA URI, but it is not true and never was, it might work in simple cases, however it will fail in some complex one.
airflow/airflow/providers/common/sql/hooks/sql.py
Lines 184 to 192 in 2ab6081
| def get_uri(self) -> str: | |
| """ | |
| Extract the URI from the connection. | |
| :return: the extracted uri. | |
| """ | |
| conn = self.get_connection(getattr(self, self.conn_name_attr)) | |
| conn.schema = self.__schema or conn.schema | |
| return conn.get_uri() |
This task intend to track fixes into the hooks which based on DbApiHook.
Hooks which don't overwrite invalid DbApiHook.get_uri implementation
-
MySqlHookfrommysqlprovider. This hook provide support for two different drivers.-
mysqlclient: https://pypi.org/project/mysqlclient/ -
mysql-connector-python: https://pypi.org/project/mysql-connector-python/
-
- OracleHook from
oracleprovider - JdbcHook from
jdbcprovider - TrinoHook from
trinoprovider - HiveServer2Hook from
apache.hiveprovider - ImpalaHook from
apache.impalaprovider - DatabricksSqlHook from
databricksprovider - ExasolHook from
exasolprovider - PrestoHook from
prestoprovider - VerticaHook from
verticaprovider - TeradataHook from
teradataprovider
Hooks which uses Connection.get_uri for construct SQLAlchemy URI
- PostgresHook from
postgresprovider. Connection to Postgres failed due to special characters in a password #38187, Connection id "extra" error #34456 - MsSqlHook from
microsoft.mssqlprovider - SqliteHook from
sqliteprovider
Committer
- I acknowledge that I am a maintainer/committer of the Apache Airflow project.
dablapotiuk and Bowrnapotiuk and geeksambhu
Metadata
Metadata
Assignees
Labels
good first issuekind:metaHigh-level information important to the communityHigh-level information important to the communityprovider:apache-hiveprovider:apache-impalaprovider:common-sqlprovider:databricksprovider:exasolprovider:jdbcprovider:microsoft-mssqlprovider:mysqlprovider:postgresprovider:prestoprovider:sqliteprovider:trinoprovider:vertica