NFeruch - FreePalestine
NFeruch - FreePalestine

Reputation: 1154

Is there any advantage to using SimpleHttpOperator over regular python requests in Airflow?

In airflow, I learned about using the Simple HttpOperator to grab json from an api. Without airflow I would just get the json using requests. Is there any advantage to using the airflow way rather than just hooking up a requests function to a PythonOperator?

Upvotes: 1

Views: 933

Answers (1)

Elad Kalif
Elad Kalif

Reputation: 16079

You can do anything with PythonOperator. The variety of operators in Airflow are just to make your life easier - if operator fits to your use case fully it saves you the trouble of implementing it yourself. At the end all operators are implemented as Python function. The advantage is mostly with ease of use.

Upvotes: 1

Related Questions