uranusjr commented on a change in pull request #16521:
URL: https://github.com/apache/airflow/pull/16521#discussion_r655786768
##########
File path: airflow/hooks/dbapi.py
##########
@@ -53,6 +53,8 @@ class DbApiHook(BaseHook):
supports_autocommit = False
# Override with the object that exposes the connect method
connector = None # type: Optional[ConnectorProtocol]
+ # Override to use different schema from connection setting
+ schema = None
Review comment:
Ah I see, you mean we should add `schema` as an argument on `DbApiHook`,
and use it to populate `self.schema`. Yes, that would be a reasonable design.
Previously I thought you were suggesting something like
```python
class DbApiHook:
def __init__(self, ...): # No schema= here.
...
self.schema = None
class PostgresHook(DbApiHook):
def __init__(self, ..., schema=None):
super().__init__(...)
self.schema = schema
```
This would be more difficult to maintain (not *too* difficult, but
comparitively so).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]