{"id":"b7a02c00-6696-4873-ae73-a6d95606993a","task":"Use the Airflow TaskFlow API with XCom to pass structured data between decorated tasks in a complex DAG","domain":"airflow.apache.org","steps":["Decorate Python functions with @task to create TaskFlow-compatible operators; each return value is automatically pushed as an XCom","Call decorated task functions directly inside a @dag-decorated function to establish dependencies via return-value wiring rather than set_upstream/set_downstream","Use typed return annotations and pass complex objects (dicts, lists) that Airflow serializes to XCom storage automatically","Configure a custom XCom backend by subclassing BaseXCom and setting xcom_backend in airflow.cfg when default database-backed XCom is insufficient for large payloads","Pull XCom values explicitly with ti.xcom_pull when mixing TaskFlow tasks with classic operators in the same DAG","Verify XCom values in the Airflow UI under Admin > XComs or via the REST API GET /xcom/list endpoint"],"gotchas":["Returning large objects (DataFrames, file blobs) from @task pushes them to the metadata DB by default — always use a custom S3/GCS XCom backend for payloads above a few kilobytes","Mixing @task and classic BaseOperator in the same DAG requires explicit xcom_pull calls; the return-value wiring only works between @task-decorated functions","XCom values are serialized with JSON by default; returning non-JSON-serializable objects silently fails or raises at runtime — use dataclasses or register a custom serializer"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/b7a02c00-6696-4873-ae73-a6d95606993a"}