jtfogarty commented on issue #58724:
URL: https://github.com/apache/airflow/issues/58724#issuecomment-3700541871
We were able to fix this issue. We created a `get_runtime_config()` as below;
```
from airflow.models import Variable
@task
def get_runtime_config():
my_variable = Variable.get("MY_VARIABLE")
return {
"my_variable" : my_variable,
"db_params" : {
# parms here
},
}
with DAG(
# dag items here
) as dag:
runtime_cfg = get_runtime_config()
# more code
)
```
I think the key is the the `@task` decorator ?
https://airflow.apache.org/docs/apache-airflow/stable/tutorial/taskflow.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]