rochamc opened a new issue #13812:
URL: https://github.com/apache/airflow/issues/13812


   **Apache Airflow version**: 2.0.0
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: On-premise private cloud, 
appliance with 2vCPU and 8GB RAM (not production server)
   - **OS** (e.g. from /etc/os-release): Debian GNU/Linux 9 (stretch)
   - **Kernel** (e.g. `uname -a`): Linux 4.9.0-8-amd64 #1 SMP Debian 
4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
   - **Install tools**: manual installation on host OS (no docker/kubernetes)
   
   **What happened**:
   
   sqlalchemy.exc.DataError: (_mysql_exceptions.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 (%s, %s, %s, %s, %s, %s)]
   
   **What you expected to happen**:
   
   We are migrating all of our DAGs to the new Apache Airflow 2.0.0 version 
(from the 1.10.12 version). One of the DAGs uses the SimpleHTTPOperator to 
fetch JSON data from an API and saves the JSON into the XCOM so that the next 
task can fetch, process and save it. For the migration, we had to change the 
SimpleHTTPOperator parameter from "xcom_push=true" to "do_xcom_push=true". We 
expected that after doing the parameter change, the DAG would run like it does 
in the production server (in the older 1.10.12 version). We made the same 
change to other DAGs and it worked properly, but when we do that in the 2.0.0 
we get the error "Data too long for column 'value' at row 1". Apparently in 
this new version (2.0.0), the XCOM max column size is lower than the previous 
version we are using.
   
   **How to reproduce it**:
   
   Fetch an API using the SimpleHTTPOperator with the parameter do_xcom_push to 
true with a response longer than the xcom column size.
   
   `get_resource = SimpleHttpOperator(
           task_id='get_example',
           method='GET',
           endpoint='/endpoint/resource/',
           http_conn_id = 'connection_example',
           trigger_rule="all_done",
           do_xcom_push=True,
           dag=dag
   )`
   
   Also, Before migrating those SimpleHttpOperator tasks to python tasks, we 
would like to know if there is any other way of passing the SimpleHTTPOperator 
response without the XCOM usage?
   
   Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to