I\'m learning Airflow and have a simple quesiton. Below is my DAG called dog_retriever
import airflow
from airflow import DAG
from airflow.opera
So since this is SimpleHttpOperator and the actual json is pushed to XCOM and you can get it from there. Here is the line of code for that action: https://github.com/apache/incubator-airflow/blob/master/airflow/operators/http_operator.py#L87
What you need to do is set xcom_push=True
, so your first t1 will be the following:
t1 = SimpleHttpOperator(
task_id='get_labrador',
method='GET',
http_conn_id='http_default',
endpoint='api/breed/labrador/images',
headers={"Content-Type": "application/json"},
xcom_push=True,
dag=dag)
You should be able to find all JSON with return value
in XCOM, more detail of XCOM can be found at: https://airflow.incubator.apache.org/concepts.html#xcoms