Bernardo Caldas created AIRFLOW-1307:
----------------------------------------
Summary: Creating a new Hook requires modifying models.py
Key: AIRFLOW-1307
URL: https://issues.apache.org/jira/browse/AIRFLOW-1307
Project: Apache Airflow
Issue Type: Improvement
Components: hooks, models
Affects Versions: 1.8.1
Reporter: Bernardo Caldas
if I create a new hook, I need to go and change models.py to add it to the
connection types and to be able to return my custom hook. For instance, in my
plugins, I created a SybaseHook, and I had to add this code to the get_hook
method.
{code:python}
elif self.conn_type == 'sybase':
from airflow.hooks.sybase_plugin import SybaseHook
return SybaseHook(sybase_conn_id=self.conn_id)
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)