Yifei Hong created AIRFLOW-1751:
-----------------------------------

             Summary: 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: Airflow 1.8
         Environment: Linux
            Reporter: Yifei Hong
         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.

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|thumbnail!

!db.png|thumbnail!
 




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to