Skip to content
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

Add template fields renderers to operators #11177

Closed
turbaszek opened this issue Sep 27, 2020 · 8 comments
Closed

Add template fields renderers to operators #11177

turbaszek opened this issue Sep 27, 2020 · 8 comments
Labels
area:providers area:webserver Webserver related Issues contributors-workshop Issues that are good for first-time contributor's workshop good first issue kind:feature Feature Requests

Comments

@turbaszek
Copy link
Member

Description

In #11061 we've added a nice feature of "template fields renderers". This allows users to define what renderer should be used for rendering template fields values in Web UI. This is super useful for rendering big dictionaries, bash commands, sql queries, yaml files.

Use case / motivation

Improve rendering of template fields in Airflow Web UI and remove the need of using pre-defined keywords.

Operators that should be updated with template filed renderers:

  • BashOperator
  • SimpleHttpOperator
  • PostgresOperator
  • MySQLOperator
    and any other that we think may gain from this feature 😸

Related Issues
#11061

@potiuk
Copy link
Member

potiuk commented Sep 27, 2020

Will it work with the backports :)?

@mik-laj
Copy link
Member

mik-laj commented Sep 27, 2020

@potiuk Yes, but this feature will not be available in older version, but will not damage operators. We'll just have the attribute set in the class and never used.

@potiuk
Copy link
Member

potiuk commented Sep 27, 2020

Cool!

@avirlrma
Copy link

Hey,
Can I take this up?

@turbaszek
Copy link
Member Author

@avirlrma please feel free to open a PR referencing this issue. You don't have to change all operators at once 👍

@turbaszek
Copy link
Member Author

@pkonarzewski which operators would you like to improve?

@enrique-ayala
Copy link

I would also like to contribute on this one

kaxil pushed a commit that referenced this issue Apr 2, 2021
See #11177. Mostly SQL fields and Python options. Two notable execeptions:

* `WinRMOperator.command` is marked as a new renderer `powershell`.
* A new `jinja` renderer is implemented. The Pygment lexer is called `DjangoLexer`, but [Pygments suggets rendering Jinja2 with it](https://pygments.org/docs/lexers/#pygments.lexers.templates.DjangoLexer).

Fix #14543.
@turbaszek turbaszek added the contributors-workshop Issues that are good for first-time contributor's workshop label Jul 4, 2021
@oyarushe
Copy link
Contributor

oyarushe commented Jul 9, 2021

I would like to work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers area:webserver Webserver related Issues contributors-workshop Issues that are good for first-time contributor's workshop good first issue kind:feature Feature Requests
Projects
None yet
Development

No branches or pull requests

8 participants