pankajkoti commented on code in PR #48507:
URL: https://github.com/apache/airflow/pull/48507#discussion_r2025310246


##########
providers/databricks/src/airflow/providers/databricks/triggers/databricks.py:
##########
@@ -119,3 +119,84 @@ async def run(self):
                     }
                 )
                 return
+
+
+class DatabricksSQLStatementExecutionTrigger(BaseTrigger):
+    """
+    The trigger handles the logic of async communication with DataBricks SQL 
Statements API.
+
+    :param statement_id: ID of the SQL statement.
+    :param databricks_conn_id: Reference to the :ref:`Databricks connection 
<howto/connection:databricks>`.
+    :param polling_period_seconds: Controls the rate of the poll for the 
result of this run.
+        By default, the trigger will poll every 30 seconds.
+    :param retry_limit: The number of times to retry the connection in case of 
service outages.
+    :param retry_delay: The number of seconds to wait between retries.
+    :param retry_args: An optional dictionary with arguments passed to 
``tenacity.Retrying`` class.
+    """
+
+    def __init__(
+        self,
+        statement_id: str,
+        databricks_conn_id: str,
+        polling_period_seconds: int = 30,
+        retry_limit: int = 3,
+        retry_delay: int = 10,
+        retry_args: dict[Any, Any] | None = None,
+        caller: str = "DatabricksSQLStatementExecutionTrigger",

Review Comment:
   I observed this caller is being set in all objects across the Databricks 
provider and needed for triggerer but more to know where the API request is 
coming from. It gets set in the hook initialisation if you look below and used 
in 
https://github.com/apache/airflow/blob/e85b61dd40ef6a1a16fd9260aff4fe6f228be6e8/providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py#L157
 which then gets set in the headers for each of API requests to Databricks as 
implemented there. So, I guess, it's good to keep it for consistency of the 
provider



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to