allebacco commented on a change in pull request #21663:
URL: https://github.com/apache/airflow/pull/21663#discussion_r809773234
##########
File path: airflow/providers/databricks/operators/databricks.py
##########
@@ -511,6 +512,11 @@ def __init__(
self.databricks_retry_delay = databricks_retry_delay
self.wait_for_termination = wait_for_termination
+ if job_name or 'job_name' in self.json:
Review comment:
You can move this after adding job_name and job_id to the json to
simplify the code and the checks:
```
if job_name:
self.json['job_name'] = job_name
if job_id is not None:
self.json['job_id'] = job_id
if 'job_name' in self.json and 'job_id' in self.json:
raise AirflowException("Argument 'job_name' is not allowed with argument
'job_id'")
```
--
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]