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 C80C2200C10 for ; Fri, 20 Jan 2017 04:21:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C681D160B54; Fri, 20 Jan 2017 03:21:31 +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 1D315160B57 for ; Fri, 20 Jan 2017 04:21:30 +0100 (CET) Received: (qmail 72264 invoked by uid 500); 20 Jan 2017 03:21:30 -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 72255 invoked by uid 99); 20 Jan 2017 03:21:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2017 03:21:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B80371A0233 for ; Fri, 20 Jan 2017 03:21:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id A-KwnTJNNQJ2 for ; Fri, 20 Jan 2017 03:21:28 +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 AB9D85F477 for ; Fri, 20 Jan 2017 03:21:27 +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 17469E008F for ; Fri, 20 Jan 2017 03:21:27 +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 68D6525286 for ; Fri, 20 Jan 2017 03:21:26 +0000 (UTC) Date: Fri, 20 Jan 2017 03:21:26 +0000 (UTC) From: "I don't want an account (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AIRFLOW-775) AutoCommit in jdbc hook seems not to turn off if set to false MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 20 Jan 2017 03:21:32 -0000 I don't want an account created AIRFLOW-775: ----------------------------------------------- Summary: AutoCommit in jdbc hook seems not to turn off if set to false Key: AIRFLOW-775 URL: https://issues.apache.org/jira/browse/AIRFLOW-775 Project: Apache Airflow Issue Type: Bug Components: db, hooks Reporter: I don't want an account If I use JdbcHook and run with autocommit=false I still get exceptions when the commit is made because autocommit mode is on by default and apparently was not set to off. This can be worked around by setting the connection host with ;autocommit=false however it doesn't seem like the intended behavior when passing autocommit=False with the hook's methods. The JdbcHook does not seem to have a constructor that could take the jdbc driver, location, host, schema, port, username, and password and work without a set connection id, so working around this in code isn't too straightforward either. [2017-01-19 19:03:22,728] {models.py:1286} ERROR - org.netezza.error.NzSQLException: The connection object is in auto-commit mode Traceback (most recent call last): File "/Users/daniellamblin/VEnvs/airflow-dags/lib/python2.7/site-packages/airflow/models.py", line 1242, in run result = task_copy.execute(context=context) File "/Users/daniellamblin/VEnvs/airflow-dags/lib/python2.7/site-packages/airflow/operators/python_operator.py", line 66, in execute return_value = self.python_callable(*self.op_args, **self.op_kwargs) File "/Users/daniellamblin/airflow/dags/dpds/dpds_go_pda_dwd_sku_and_dwd_hist_up_sku_grade.py", line 356, in stage_to_update_tables hook.run(sql=sql, autocommit=False) File "/Users/daniellamblin/VEnvs/airflow-dags/lib/python2.7/site-packages/airflow/hooks/dbapi_hook.py", line 134, in run conn.commit() File "/Users/daniellamblin/VEnvs/airflow-dags/lib/python2.7/site-packages/jaydebeapi/__init__.py", line 391, in commit _handle_sql_exception() File "/Users/daniellamblin/VEnvs/airflow-dags/lib/python2.7/site-packages/jaydebeapi/__init__.py", line 148, in _handle_sql_exception_jpype reraise(exc_type, exc_info[1], exc_info[2]) File "/Users/daniellamblin/VEnvs/airflow-dags/lib/python2.7/site-packages/jaydebeapi/__init__.py", line 389, in commit self.jconn.commit() DatabaseError: org.netezza.error.NzSQLException: The connection object is in auto-commit mode [2017-01-19 19:03:22,730] {models.py:1306} INFO - Marking task as FAILED. -- This message was sent by Atlassian JIRA (v6.3.4#6332)