Skip to content

Xcom: the parameters of key named value is too long #19834

@byr18

Description

@byr18

Apache Airflow version

2.0.2

Operating System

Ubuntu:18.04.1

Versions of Apache Airflow Providers

apache-airflow-providers-ftp==1.0.0
apache-airflow-providers-http==1.0.0
apache-airflow-providers-imap==1.0.0
apache-airflow-providers-sqlite==1.0.0
apache-airflow-providers-ssh==1.0.0

Deployment

Other

Deployment details

No response

What happened

I use the SSHOperator,then i get the error:
sqlalchemy.exc.DataError: (pymysql.err.DataError) (1406, "Data too long for column 'value' at row 1")
[SQL: INSERT INTO xcom (key, value, timestamp, execution_date, task_id, dag_id) VALUES (%(key)s, %(value)s, %(timestamp)s, %(execution_date)s, %(task_id)s, %(dag_id)s)]
[parameters: {'key': 'return_value', 'value': b'"cnVuIHJlZ2lzdGVyIC4uLgpweXRob24zIC9kYXRhL3Rlc3RfZGF0YS9haXJmbG93L21vZGVsLXZpYS1mYWNlLXgtZGVidWctM2QvUmVnVXNlcnNNcC5weSAtLXBhcmFtcyB7Imhvc3QiOiIxNzI ... (155033 characters truncated) ... 5q+U6L+H5bCPIiwicmVxdWVzdF9pZCI6IjI5OTkwMDkyLThjNDAtNDIzYi04OGJiLWMyN2EzZTBmZDc2ZSJ9CidUb3RhbCB0aW1lOiAxNjM3ODMzNTAzLjc3NzM2NTQnCidGaW5pc2hlZCEnCg=="', 'timestamp': datetime.datetime(2021, 11, 25, 9, 45, 4, 7199), 'execution_date': datetime.datetime(2021, 11, 25, 9, 44, 51, 99638), 'task_id': '', 'dag_id': ''}]
(Background on this error at: http://sqlalche.me/e/13/9h9h)

I guess the xcom saved some unnecessary information somewhere I don't know,example:the error code ,which task print

What you expected to happen

No response

How to reproduce

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions