You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/02/20 00:43:53 UTC

[GitHub] cixuuz commented on issue #4733: [AIRFLOW-3481] Add SFTP in connection type

cixuuz commented on issue #4733: [AIRFLOW-3481] Add SFTP in connection type
URL: https://github.com/apache/airflow/pull/4733#issuecomment-465371583
 
 
   I think you asked a very good question, why we have a field `conn type` which didn't link to anything. Maybe we can ask who designed this. 
   
   IMO, it could be useful:
   1. from user experience perspective, sometimes you cannot tell which is which by reading connection settings. For instance, any hook based on TCP looks similar e.g. HTTP/FTP/SFTP/SSH... Airflow sometimes are tools not only for developers, but also for analysts or data scientist. Those people may not be familiar with those protocols. By having a conn type, they can quickly recognize them. 
   2. from develop perspective, there is a factory method ```get_conn``` in ```models/connection.py```. The purpose of that one looks like providing a DB conn. In my use case, I made a download/upload interface for any file storage or transfer protocols such as FTP/SFTP/S3/Azure etc. A factory method is needed to get the correct hook based on identifiers. If we have more specific conn_type, it would be great for simplifying my code. 
   
   Further, I think any existing hook should have its corresponding conn type. Or the conn type could be registered to existing hook. This may related to the topic that AIP-8 split Hooks/Operators to separate repos.   
   
   
   
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services