mariotaddeucci commented on a change in pull request #16915:
URL: https://github.com/apache/airflow/pull/16915#discussion_r669201223



##########
File path: airflow/providers/tableau/operators/tableau_refresh_workbook.py
##########
@@ -67,18 +68,16 @@ def execute(self, context: dict) -> str:
         with TableauHook(self.site_id, self.tableau_conn_id) as tableau_hook:
             workbook = self._get_workbook_by_name(tableau_hook)
 
-            job_id = self._refresh_workbook(tableau_hook, workbook.id)
-            if self.blocking:
-                from airflow.providers.tableau.sensors.tableau_job_status 
import TableauJobStatusSensor
+            job_id = TableauOperator(
+                resource='workbooks',
+                method='refresh',
+                resource_id=workbook.id,
+                site_id=self.site_id,
+                tableau_conn_id=self.tableau_conn_id,
+                task_id='refresh_workbook',
+                dag=None,
+            ).execute(context={})

Review comment:
       The main difference is `TableauRefreshWorkbookOperator` uses a find by 
name and the new uses by id.
   Now I add an option to choose what find_by will use, so now the 
`TableauRefreshWorkbookOperator` is not necessary.
   Thanks for the alert 




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