Repository navigation
Asset and Xom in Docker image #54372
Unanswered
turbothiele
asked this question in
General
Replies: 2 comments
|
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
0 replies
|
You have forgotten to mention how things do not work. There are no details in your issue that would even indicate what kind of problem you have. Generally speaking you can still continue discussing it here - but if you want anyone to be able to help you, you need to describe whet your problem is. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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?
Code of Conduct
All reactions