You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/07 13:54:00 UTC

[GitHub] [airflow] alexott commented on a diff in pull request #23712: Add databricks job sensors

alexott commented on code in PR #23712:
URL: https://github.com/apache/airflow/pull/23712#discussion_r891260954


##########
airflow/providers/databricks/sensors/databricks.py:
##########
@@ -0,0 +1,103 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""Databricks sensors"""
+
+from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Union
+
+from airflow.exceptions import AirflowException
+from airflow.providers.databricks.hooks.databricks import DatabricksHook
+from airflow.sensors.base import BaseSensorOperator
+from airflow.utils.context import Context
+
+if TYPE_CHECKING:
+    from airflow.sensors.base import PokeReturnValue
+
+
+class DatabricksJobRunSensor(BaseSensorOperator):
+    """
+    Check for the state of a submitted Databricks job run or specific task of a job run.
+
+    :param run_id: Id of the submitted Databricks job run or specific task of a job run. (templated)

Review Comment:
   Not necessary to wait for the job in current pipeline. it could be to wait for results from jobs in other pipelines, etc.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org