You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Alpesh (JIRA)" <ji...@apache.org> on 2019/01/06 22:18:00 UTC

[jira] [Created] (AIRFLOW-3640) Enable other operator than python_operator to push custom key-values to xcom and not only XCOM_RETURN_KEY

Alpesh created AIRFLOW-3640:
-------------------------------

             Summary: Enable other operator than python_operator to push custom key-values to xcom and not only XCOM_RETURN_KEY
                 Key: AIRFLOW-3640
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3640
             Project: Apache Airflow
          Issue Type: Improvement
          Components: core, models
    Affects Versions: 1.10.1
            Reporter: Alpesh
            Assignee: Alpesh


The base operator forces return values to be pushed to xcom with XCOM_RETURN_KEY as xcom key. This allows only one value to be pushed to xcom unless we use Python Operator and add xcom custom values from Python callable with context.

Adding support from base operator to take dictionary as return value from task_copy.execute and populating values from dictionary to xcom can be a step further in this direction. XCOM_RETURN_KEY can still be default xcom key in case the run only returns a string.

As an example, bash_operator should be able to return last line (as it does now) and other values containing exist status (can be used in failure_call_back) and entire log message.



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