GitHub user turbothiele created a discussion: Asset and Xom in Docker image

### Apache Airflow version

3.0.4

### If "Other Airflow 2 version" selected, which one?

_No response_

### What happened?

I'm using version 3.0.4 in a Docker container. This example no longer runs in 
version:

from airflow.sdk import asset

@asset(schedule="@daily")
def extracted_data():
 return {"a": 1, "b": 2}

@asset(schedule=extracted_data)
def transformed_data(context):
 data = context["ti"].xcom_pull(
 dag_id="extracted_data",
 task_ids="extracted_data",
 key="return_value",
 include_prior_dates=True,
 )
 return {k: v * 2 for k, v in data.items()}

@asset(schedule=transformed_data)
def loaded_data(context):
 data = context["task_instance"].xcom_pull(
 dag_id="transformed_data",
 task_ids="transformed_data",
 key="return_value",
 include_prior_dates=True,
 )
 summed_data = sum(data.values())
 print(f"Summed data: {summed_data}")



### What you think should happen instead?

_No response_

### How to reproduce

from airflow.sdk import asset

@asset(schedule="@daily")
def extracted_data():
 return {"a": 1, "b": 2}

@asset(schedule=extracted_data)
def transformed_data(context):
 data = context["ti"].xcom_pull(
 dag_id="extracted_data",
 task_ids="extracted_data",
 key="return_value",
 include_prior_dates=True,
 )
 return {k: v * 2 for k, v in data.items()}

@asset(schedule=transformed_data)
def loaded_data(context):
 data = context["task_instance"].xcom_pull(
 dag_id="transformed_data",
 task_ids="transformed_data",
 key="return_value",
 include_prior_dates=True,
 )
 summed_data = sum(data.values())
 print(f"Summed data: {summed_data}")

### Operating System

Ubuntu 24 Docker Image

### Versions of Apache Airflow Providers

_No response_

### Deployment

Official Apache Airflow Helm Chart

### Deployment details

_No response_

### Anything else?

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)


GitHub link: https://github.com/apache/airflow/discussions/54372

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to