-
I want to use dag params on as-istask_refresh_workbook_blocking = TableauOperator(
resource="workbooks",
method="refresh",
match_with="id",
find="MyWorkbook",
blocking_refresh=True,
task_id="refresh_tableau_workbook_blocking",
dag=dag,
) to-betask_refresh_workbook_blocking = TableauOperator(
resource="workbooks",
method="refresh",
match_with="{{ params.match_with }}",
find="{{ params.find }}",
blocking_refresh=True,
task_id="refresh_tableau_workbook_blocking",
dag=dag,
) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Option 1: Quick solution.overwrite class attribute from airflow.providers.tableau.operators.tableau import TableauOperator
TableauOperator.template_fields = {"match_with", "find"} create new operator based on TableauOperator from airflow.providers.tableau.operators.tableau import TableauOperator
class AwesomeTableauOperator(TableauOperator):
template_fields = {"match_with", "find"} Option 2: Long-term SolutionMake other potential users of Tableau Provider happy and make a PR with appropriate changes in TableauOperator. |
Beta Was this translation helpful? Give feedback.
-
@Taragolis thx to answer! I'll make a pr, your option.1~! |
Beta Was this translation helpful? Give feedback.
-
I make first pr. #29360 |
Beta Was this translation helpful? Give feedback.
Option 1: Quick solution.
overwrite class attribute
create new operator based on TableauOperator
Option 2: Long-term Solution
Make other potential users of Tableau Provider happy and make a PR with appropriate changes in TableauOperator.