-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support Airflow Variable? #15
Comments
hi @everglory99 ! I'm glad to hear that you have found We do not currently have first-class support for variables, although you can in principle access them using the "verbatim string" approach. It would require specifying that the DAG import the name: my-workflow
imports:
objects:
- module: airflow.model
object: Variable
operators:
- name: my-operator
type: my-operator-type
properties:
my_arg: <<Variable.get("variable_name")>> Or alternatively you could access them via the airflow jinja templates, as shown in the link you included, again with the requirement that the operator property be of type I hope that one of these approaches will be useful to you now, but please let us know if it is not. We are gradually assembling a feature wish-list for the next significant version bump, and this would certainly be a viable candidate. We don't use airflow Variables at Etsy so we're not currently prioritizing it, but we're excited to have external interest in this project, so if you need broader support for variables, we'll factor that into our considerations :) |
Thanks so much for your help, I totally miss the "verbatim string" part in your blog. After fixing some typos in your code example, the following works great for me!
|
Ooh, great, I'm glad to hear it @everglory99 ! And sorry for the typos, it was late when I wrote it 😉. Thanks for including the corrected example. I will leave this issue open as a reminder to include airflow |
I still hope official Variable support available due to the limitation of nested Verbatim usage. For example,
is not possible because secrets itself is using Verbatim. |
Hi,
Thanks for open sourcing boundary-layer, this is really useful! While I am prototyping some plugins for some other open sourced operators and internal operators, I can't find any support for Variables (https://airflow.apache.org/concepts.html#variables). Am I missing something? Is there a plan to support Variable? The use case is that we want to maintain one yaml file across different environments. Thanks for the help!
The text was updated successfully, but these errors were encountered: