Skip to content

feat: add predefined template vairable ds and function ds_add #1541

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

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

jczhong84
Copy link
Collaborator

@jczhong84 jczhong84 commented Feb 28, 2025

Adding below predefined variable and function

  • variable {{ ds }}: same as yesterday
  • function {{ ds_add(ds, days) }}: add/sub days from ds

image


Snip20250228_64
rendered as
image


Snip20250228_70
rendered as
image


image
rendered as
image

@czgu
Copy link
Collaborator

czgu commented Feb 28, 2025

thanks JC! I think the format for ds_add is macros.ds_add.

Also great job for updating the docs, could you have a separate section on Airflow variables and include this link https://airflow.apache.org/docs/apache-airflow/stable/templates-ref.html

czgu
czgu previously approved these changes Mar 1, 2025
@jczhong84 jczhong84 merged commit 6dade6b into pinterest:master Mar 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants