Dong-yeong0 commented on issue #48145:
URL: https://github.com/apache/airflow/issues/48145#issuecomment-2749954498
As a workaround, avoid direct imports between DAGs to prevent `fileloc`
inconsistencies. Instead, consider using Airflow’s built-in mechanisms for
sharing data
* Variables: Store the values in airflow variable ui
This allows DAGs to access the same data without relying on direct
imports.
```python
from airflow.models import Variable
VARIABLE = Variable.get("my_key", default_var="some_variable")
```
* XCom: Pass runtime data between tasks or DAGs dynamically.
Using `xcom_push` and `xcom_pull` helps decouple DAGs and ensures proper
execution without unintended side effects.
By following this approach, you can prevent parsing issues, improve DAG
modularity, and align with Airflow’s best practices.
For more details, check the official documentation
https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/variables.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]