Recall & Review
beginner
What is the purpose of the SimpleHttpOperator in Airflow?
SimpleHttpOperator is used to make HTTP requests to APIs or web services as part of an Airflow workflow.
Click to reveal answer
beginner
Which HTTP methods can SimpleHttpOperator use?
SimpleHttpOperator supports common HTTP methods like GET, POST, PUT, DELETE, and PATCH.
Click to reveal answer
beginner
How do you specify the API endpoint URL in SimpleHttpOperator?
You specify the endpoint URL using the 'endpoint' parameter, which is appended to the base URL defined in the HTTP connection.
Click to reveal answer
intermediate
What parameter do you use to send data in a POST request with SimpleHttpOperator?
You use the 'data' parameter to send the request body, usually as a JSON string or dictionary.
Click to reveal answer
intermediate
How can you handle the response from an API call made by SimpleHttpOperator?
You can access the response content in the task's XCom by using the 'response_filter' parameter or by pulling the XCom in downstream tasks.
Click to reveal answer
What parameter in SimpleHttpOperator defines the HTTP method to use?
✗ Incorrect
The 'method' parameter specifies the HTTP method like GET or POST in SimpleHttpOperator.
Where does SimpleHttpOperator get the base URL for API calls?
✗ Incorrect
SimpleHttpOperator uses the base URL defined in the Airflow HTTP connection configured in the Airflow UI or environment.
Which parameter allows you to add headers to the HTTP request in SimpleHttpOperator?
✗ Incorrect
The 'headers' parameter lets you add HTTP headers like Content-Type or Authorization.
How can you extract the API response for use in other tasks?
✗ Incorrect
SimpleHttpOperator can push the response to XCom using 'response_filter' for downstream tasks to use.
Which of these is NOT a valid HTTP method for SimpleHttpOperator?
✗ Incorrect
SimpleHttpOperator does not support the CONNECT method; common methods are GET, POST, PUT, DELETE, PATCH.
Explain how to configure and use SimpleHttpOperator to make a POST API call in Airflow.
Think about connection setup, HTTP method, data sending, and response handling.
You got /6 concepts.
Describe how SimpleHttpOperator integrates with Airflow's XCom system for API responses.
Focus on how data flows between tasks using XCom.
You got /4 concepts.