allebacco commented on a change in pull request #21663:
URL: https://github.com/apache/airflow/pull/21663#discussion_r809774499



##########
File path: airflow/providers/databricks/operators/databricks.py
##########
@@ -536,6 +542,12 @@ def _get_hook(self) -> DatabricksHook:
 
     def execute(self, context: 'Context'):
         hook = self._get_hook()
+        if 'job_name' in self.json:
+            job_id = hook.find_job_id_by_name(self.json['job_name'])
+            if not job_id:

Review comment:
       Are we sure that the job id in Databricks can never be `0`? In that case 
`not job_id` will be evaluated to `True`. So probably a `job_id is None` could 
be a better approach.




-- 
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