MariaDB错误在AirFlow中使用pymysql

时间:2017-11-04 01:34:02

标签: sqlalchemy airflow pymysql

尝试使用MariaDB的气流并得到以下sql错误:我在test.py中尝试了几乎相同的东西并且它有效。不知道气流如何处理这个问题。有提示吗?气流v1.7.1.3。

sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'default'', 3, 'BashOperator', NULL)' at line 1") [SQL: u'INSERT INTO task_instance (task_id, dag_id, execution_date, start_date, end_date, duration, state, try_number, hostname, unixname, job_id, pool, queue, priority_weight, operator, queued_dttm) VALUES (%(task_id)s, %(dag_id)s, %(execution_date)s, %(start_date)s, %(end_date)s, %(duration)s, %(state)s, %(try_number)s, %(hostname)s, %(unixname)s, %(job_id)s, %(pool)s, %(queue)s, %(priority_weight)s, %(operator)s, %(queued_dttm)s)'] [parameters: {'execution_date': datetime.datetime(2017, 10, 31, 0, 0), 'end_date': None, 'job_id': '43', 'task_id': 'print_date', 'pool': None, 'unixname': 'nrsapp', 'queued_dttm': None, 'try_number': 1, 'queue': 'default', 'operator': 'BashOperator', 'state': u'running', 'start_date': datetime.datetime(2017, 11, 3, 17, 53, 46, 178764), 'duration': None, 'priority_weight': 3, 'hostname': 'zlt11238', 'dag_id': 'tutorial'}]

0 个答案:

没有答案