You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Aizhamal Nurmamat kyzy (JIRA)" <ji...@apache.org> on 2019/05/17 20:05:01 UTC

[jira] [Reopened] (AIRFLOW-1751) SqlAlchemy Error when backfilling dag and connecting to SQL Server

     [ https://issues.apache.org/jira/browse/AIRFLOW-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aizhamal Nurmamat kyzy reopened AIRFLOW-1751:
---------------------------------------------

Reopening to do component refactor. Will resolve after moving.

> SqlAlchemy Error when backfilling dag and connecting to SQL Server
> ------------------------------------------------------------------
>
>                 Key: AIRFLOW-1751
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1751
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: backfill, db
>    Affects Versions: 1.8.0
>         Environment: Linux
>            Reporter: Yifei Hong
>            Priority: Major
>         Attachments: db.png, error.log, web.png
>
>
> Airflow works well for me when using sqlite as the backend database.
> In order to use LocalExecutor to test on parallel runs (pseudo), I set up the db connection to MS SQL Server with mssql+pyodbc. The connection is good and all metadata tables are created. However, when trying to backfill the dag run, I always encounter the same sqlalchemy.exc.StatementError for any example dag. Error log is attached with the full stack trace.
> airflow backfill example_bash_operator -s 2017-10-18
> sqlalchemy.exc.StatementError: (exceptions.AttributeError) 'module' object has no attribute 'BinaryNull' [SQL: u'INSERT INTO dag_run (dag_id, execution_date, start_date, end_date, state, run_id, external_trigger, conf) OUTPUT inserted.id VALUES (?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: [{'end_date': None, 'run_id': u'backfill_2017-10-18T00:00:00', 'execution_date': datetime.datetime(2017, 10, 18, 0, 0), 'external_trigger': False, 'state': u'running', 'conf': None, 'start_date': datetime.datetime(2017, 10, 23, 21, 25, 9, 399710), 'dag_id': 'example_bash_operator'}]]
> When I tried to trigger the run on web GUI, it seems to be fine and I can see the record got inserted into dag_run table successfully.
> [^web.png]
> [^db.png]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)