Attributes¶
Classes¶
brickflow_plugins.airflow.operators.external_tasks_tableau.TableauRefreshABCOperator(server: str, username: str, password: str, site: str, project: str = None, parent_project: str = None, version: str = '3.14', max_async_workers: int = 5, polling_required: bool = True, polling_interval: int = 30, polling_timeout: int = 600, fail_operator: bool = True, *args, **kwargs)
¶
Bases: BaseOperator
Abstract class that implements generic functionality for TableauRefresh operators.
Parameters¶
server : str Tableau server address, e.g. https://tableau-server.com username : str Log in username password : str Log in password site : str Tableau site project : str Tableau project parent_project : str Name of the parent Tableau project version : str Tableau server API version max_async_workers : int Maximum number of asynchronous tasks that will trigger jobs and wait for completion polling_required : bool Wait for job completion to proceed, otherwise just trigger the job and proceed polling_interval : int Polling interval for the job status updates (seconds) polling_timeout : int Stop polling if the job was not completed within the specified interval (seconds) fail_operator : bool Check Tableau refresh status and fail operator if any status is 'Failure' or 'Cancelled'
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
Attributes¶
fail_operator = fail_operator
instance-attribute
¶
tableau_wrapper = None
instance-attribute
¶
wrapper_options = {'server': server, 'username': username, 'password': password, 'site': site, 'project': project, 'parent_project': parent_project, 'version': version, 'max_async_workers': max_async_workers, 'polling_required': polling_required, 'polling_interval': polling_interval, 'polling_timeout': polling_timeout}
instance-attribute
¶
Functions¶
brickflow_plugins.airflow.operators.external_tasks_tableau.TableauRefreshDataSourceOperator(data_sources: list, skip: bool = False, task_id: str = 'tableau_refresh_datasource', *args, **kwargs)
¶
Bases: TableauRefreshABCOperator
Airflow operator that handles refresh of Tableau data sources.
Parameters¶
data_sources : list List of data source names that will be refreshed skip : bool Skip execution task_id : str ID for Airflow task
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
Attributes¶
data_sources = data_sources
instance-attribute
¶
Functions¶
execute(context)
¶
Refresh data source in Tableau.
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
brickflow_plugins.airflow.operators.external_tasks_tableau.TableauRefreshEmptyException
¶
Bases: Exception
brickflow_plugins.airflow.operators.external_tasks_tableau.TableauRefreshException
¶
Bases: Exception
brickflow_plugins.airflow.operators.external_tasks_tableau.TableauRefreshWorkBookOperator(workbooks: list, skip: bool = False, task_id: str = 'tableau_refresh_workbooks', *args, **kwargs)
¶
Bases: TableauRefreshABCOperator
Airflow operator that handles refresh of Tableau workbooks.
Parameters¶
workbooks : list List of workbook names that will be refreshed skip : bool Skip execution task_id : str ID for Airflow task
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
Attributes¶
workbooks = workbooks
instance-attribute
¶
Functions¶
execute(context)
¶
Refresh workbooks in Tableau
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
brickflow_plugins.airflow.operators.external_tasks_tableau.TableauWrapper(server: str, username: str, password: str, site: str, project: str = None, parent_project: str = None, version: str = '3.14', max_async_workers: int = 5, polling_required: bool = True, polling_interval: int = 30, polling_timeout: int = 600)
¶
Class facilitates interaction with Tableau server for the purpose of refreshing data sources or work books. Refresh is triggered asynchronously, and Tableau server is polled for results for each job, until the job is finished or timeout is reached (default: 10 minutes).
Initialize TableauWrapper object with the specified parameters.
Parameters¶
server : str Tableau server address, e.g. https://tableau-server.com username : str Log in username password : str Log in password site : str Tableau site project : str Tableau project parent_project : str Name of the parent Tableau project version : str Tableau server API version max_async_workers : int Maximum number of asynchronous tasks that will trigger jobs and wait for completion polling_required : bool Wait for job completion to proceed, otherwise just trigger the job and proceed polling_interval : int Polling interval for the job status updates (seconds) polling_timeout : int Stop polling if the job was not completed within the specified interval (seconds)
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
Attributes¶
max_async_workers = max_async_workers
instance-attribute
¶
parent_project = parent_project
instance-attribute
¶
password = password
instance-attribute
¶
polling_interval = polling_interval
instance-attribute
¶
polling_required = polling_required
instance-attribute
¶
polling_timeout = polling_timeout
instance-attribute
¶
project = project
instance-attribute
¶
server = server
instance-attribute
¶
site = site
instance-attribute
¶
username = username
instance-attribute
¶
version = version
instance-attribute
¶
Classes¶
MultipleWorkingProjectsException()
¶
Bases: Exception
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
UnidentifiedWorkingProjectException()
¶
Bases: Exception
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
Functions¶
refresh_datasources(data_sources: list) -> list
¶
Asynchronously refresh specified list of Tableau data sources.
Parameters¶
data_sources : list List of data sources
Returns¶
list List of dictionaries with data sources and their respective refresh statuses
Source code in brickflow_plugins/airflow/operators/external_tasks_tableau.py
refresh_workbooks(work_books: list) -> list
¶
Asynchronously refresh specified list of Tableau workbooks.
Parameters¶
work_books : list List of work books
Returns¶
list List of dictionaries with work books and their respective refresh statuses