Rosalyn Taylor created AIRFLOW-5509:
---------------------------------------
Summary: Support PATCH method in `DatabricksHook`
Key: AIRFLOW-5509
URL: https://issues.apache.org/jira/browse/AIRFLOW-5509
Project: Apache Airflow
Issue Type: Improvement
Components: hooks
Affects Versions: 1.10.5
Reporter: Rosalyn Taylor
The current `DatabricksHook` [0] currently only supports GET and POST HTTP
operations against the Databricks API: [1]
{code:python}
if method == 'GET':
request_func = requests.get
elif method == 'POST':
request_func = requests.post
else:
raise AirflowException('Unexpected HTTP Method: ' + method)
{code}
Some of the Databricks APIs require PATCH operations. [2] This ticket is to
propose that PATCH operation support is added to the `_do_api_call()` method of
the `DatabricksHook` class. [3]
If this proposal is suitable, I'm happy to submit a PR.
[0]:
[https://github.com/apache/airflow/blob/master//airflow/contrib/hooks/databricks_hook.py#L83:7]
[1]:
[https://github.com/apache/airflow/blob/master//airflow/contrib/hooks/databricks_hook.py#L164-L169]
[2]: [https://docs.databricks.com/api/latest/scim.html#update-user-by-id-patch]
[3]:
[https://github.com/apache/airflow/blob/master//airflow/contrib/hooks/databricks_hook.py#L136]
--
This message was sent by Atlassian Jira
(v8.3.2#803003)