blob: e6dddb8bd5b32c20efb8ac25c40805bd9c876afa [file] [log] [blame]
:py:mod:`airflow.providers.databricks.utils.databricks`
=======================================================
.. py:module:: airflow.providers.databricks.utils.databricks
Module Contents
---------------
Functions
~~~~~~~~~
.. autoapisummary::
airflow.providers.databricks.utils.databricks.normalise_json_content
airflow.providers.databricks.utils.databricks.validate_trigger_event
.. py:function:: normalise_json_content(content, json_path = 'json')
Normalize content or all values of content if it is a dict to a string. The
function will throw if content contains non-string or non-numeric non-boolean types.
The reason why we have this function is because the ``self.json`` field must be a
dict with only string values. This is because ``render_template`` will fail
for numerical values.
The only one exception is when we have boolean values, they can not be converted
to string type because databricks does not understand 'True' or 'False' values.
.. py:function:: validate_trigger_event(event)
Validates correctness of the event
received from :class:`~airflow.providers.databricks.triggers.databricks.DatabricksExecutionTrigger`