Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6AFA5200CA7 for ; Wed, 14 Jun 2017 15:25:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 69519160BDB; Wed, 14 Jun 2017 13:25:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AE11C160BC0 for ; Wed, 14 Jun 2017 15:25:04 +0200 (CEST) Received: (qmail 73330 invoked by uid 500); 14 Jun 2017 13:25:03 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 73321 invoked by uid 99); 14 Jun 2017 13:25:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jun 2017 13:25:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 7C23DC3452 for ; Wed, 14 Jun 2017 13:25:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.011 X-Spam-Level: X-Spam-Status: No, score=-100.011 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id acb-1DubPtFt for ; Wed, 14 Jun 2017 13:25:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 5F44B5FB8B for ; Wed, 14 Jun 2017 13:25:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E208CE0BE0 for ; Wed, 14 Jun 2017 13:25:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1912021E0E for ; Wed, 14 Jun 2017 13:25:00 +0000 (UTC) Date: Wed, 14 Jun 2017 13:25:00 +0000 (UTC) From: "Bernardo Caldas (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AIRFLOW-1307) Creating a new Hook requires modifying models.py MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 14 Jun 2017 13:25:05 -0000 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)