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

Trigger Dag using API #10

Open
Oracy opened this issue Sep 1, 2020 · 0 comments
Open

Trigger Dag using API #10

Oracy opened this issue Sep 1, 2020 · 0 comments

Comments

@Oracy
Copy link

Oracy commented Sep 1, 2020

Context

I need to run an API using both Macro: {{ execution_date }} and {{ next_execution_date }} to run some queries, I am using this json below to POST:

Endpoint [POST]: http://localhost:8080/api/experimental/dags/exemplos-api_example/dag_runs
Json:

{
    "dag_id" : "exemplos-api_example",
    "execution_date" : "2020-08-31T00:41:25"
}

Problem

When I trigger my dag, I am trying to access the Airflow Macros but {{ next_execution_date }} is the same as my current execution date :(

I have no idea how to fix that, I really need your help guys :)

I tried to add next_execution_date on json body, but with no success, I know if I pass this value using conf I can handle that, but I do have a lot of queries and files that depends from this variable, and the easy way and faster way is handle Macro variable.

Thanks in advance :)

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

No branches or pull requests

1 participant