aldouslpzchr commented on issue #46563:
URL: https://github.com/apache/airflow/issues/46563#issuecomment-3248818659

   I got around this issue by adding `extra_job_params` to template fields of  
`_CreateDatabricksWorkflowOperator` and passing them using workflow parameters
   
   in plugins file:
   ```python
   from airflow.providers.databricks.operators import databricks_workflow
   
   
   class 
Patched_CreateDatabricksWorkflowOperator(_CreateDatabricksWorkflowOperator):
       template_fields = (
           "notebook_params",
           "extra_job_params",
       )
   
   
   databricks_workflow._CreateDatabricksWorkflowOperator = (
       Patched_CreateDatabricksWorkflowOperator
   )
   
   
   class DatabricksProviderPatcherPlugin(AirflowPlugin):
       name = "databricks_provider_patcher_plugin"
   
   ```
   `DatabricksWorkflowTaskGroup`
   ```python
   ...
                   with DatabricksWorkflowTaskGroup(
                       databricks_conn_id="dataricks_default",
                       group_id="workflow",
                       extra_job_params={
                           "parameters": [
                               {
                                   "name": "date",
                                   "default": "{{ tomorrow_ds }}",
                               },
                           ],
                       },
                   ) as workflow_tg:
   ...
   ```
   
   `DatabricksTaskOperator`
   ```python
           task = DatabricksTaskOperator(
               task_id="task",
               task_config={
                   "spark_python_task": {
                       "python_file": "...",
                       "parameters": [
                           "--date",
                           "{{ job.parameters.date }}",
                       ],
                   },
               },
           )
   ```


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