Git Product home page Git Product logo

airflow_api_plugin's People

Contributors

cwurtz avatar petedejoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

airflow_api_plugin's Issues

Trigger Dag using API

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 :)

Can't pass conf to dag

Hi,
I'm using your plugin and I got a hard time passing conf to my dag. My dag runs without problems in CLI airflow trigger_dag test --conf '{"workingDir":"/tmp/aZEf"}' . However, using your plugin, I can't pass my parameter "workingDir", I end up having None instead of /tmp/aZEf. I'm using the last version of your plugin and Airflow v1.9.0 with CeleryExecutor.
My post request looks like this : curl -X POST \ http://xxx.xxx.xxx.xxx:xxxx/api/v1/dag_runs \ -H 'authorization: secret \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -d '{"dag_id":"test","conf":{"workingDir":"/tmp/aZEf"}}'

Any help would be appreciated =]

More testing on dag_run creation

Need to do more testing on dag_run creation, specifically verifying it works with both date ranges before and after start date. But it in general just needs more thorough testing

Naive datetime issue

When setting a default_timezone other than UTC, dag_run API will return naive datetime error.
Can be fixed by adding:
from pytz import timezone
and replacing line 178 and 179 with:
local_tz = timezone(settings.conf.get('core','default_timezone'))
start_date = local_tz.localize(datetime.now())
end_date = local_tz.localize(datetime.now())

DagBag reading from a defined dag folder

Line 102 and Line 219 :
dagbag = DagBag('dags')
replace with :
dag_home = settings.conf.get('core', 'dags_folder')
dagbag = DagBag(dag_home)
This will solve empty dag response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.