-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to access Airflow variables and parameters passed via REST API #121
Comments
Airflow variables can be accessed as below within yaml specify any attribute with the value as shown below. Note the quotes, some of them are two single quotes. I am also looking at how to access params though, which is typically as DAG(params={...}), however specifying these with in yaml does not resolve. YAML params:
key: value comes out as below when printing ... print(vars(context.get('dag'))) 'params': {} Reference : https://github.com/apache/airflow/blob/main/airflow/models/dag.py#L229 |
PR submitted. |
I have a use case where I am accessing Airflow's variable using Variable.get(). How can I achieve this in yaml file.
Also, how can I access parameters (params.app_name, params.namespace etc) which I am passing via REST API as follows:
{ "conf": { "app_name":"app namet", "region":"", "namespace": "", "default_path": "", } }
The text was updated successfully, but these errors were encountered: