Repository: incubator-airflow Updated Branches: refs/heads/master c27098b8d -> cae918e91
[AIRFLOW-2591][AIRFLOW-2581] Set default value of autocommit to False in DbApiHook.run() In previous PR (AIRFLOW-2581), I changed the default value of autocommit to True in DbApiHook.run(), which may cause some performance issues, so I changed it back to False. Closes #3487 from imroc/AIRFLOW-2591 Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/cae918e9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/cae918e9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/cae918e9 Branch: refs/heads/master Commit: cae918e912fedd7d187a7ca9a9488e86caf6ad82 Parents: c27098b Author: roc <rockerc...@tencent.com> Authored: Mon Jun 11 20:47:42 2018 +0200 Committer: Fokko Driesprong <fokkodriespr...@godatadriven.com> Committed: Mon Jun 11 20:47:42 2018 +0200 ---------------------------------------------------------------------- airflow/hooks/dbapi_hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/cae918e9/airflow/hooks/dbapi_hook.py ---------------------------------------------------------------------- diff --git a/airflow/hooks/dbapi_hook.py b/airflow/hooks/dbapi_hook.py index 8f83077..7031f6a 100644 --- a/airflow/hooks/dbapi_hook.py +++ b/airflow/hooks/dbapi_hook.py @@ -137,7 +137,7 @@ class DbApiHook(BaseHook): cur.execute(sql) return cur.fetchone() - def run(self, sql, autocommit=True, parameters=None): + def run(self, sql, autocommit=False, parameters=None): """ Runs a command or a list of commands. Pass a list of sql statements to the sql parameter to get them to execute