airflow.providers.tableau.hooks.tableau
¶
Module Contents¶
Classes¶
The finish code indicates the status of the job. |
|
Connects to the Tableau Server Instance and allows to communicate with it. |
Functions¶
|
Try to parse a string into boolean. |
- airflow.providers.tableau.hooks.tableau.parse_boolean(val)[source]¶
Try to parse a string into boolean.
The string is returned as-is if it does not look like a boolean value.
- exception airflow.providers.tableau.hooks.tableau.TableauJobFailedException[source]¶
Bases:
airflow.exceptions.AirflowException
An exception that indicates that a Job failed to complete.
- class airflow.providers.tableau.hooks.tableau.TableauJobFinishCode[source]¶
Bases:
enum.Enum
The finish code indicates the status of the job.
- class airflow.providers.tableau.hooks.tableau.TableauHook(site_id=None, tableau_conn_id=default_conn_name)[source]¶
Bases:
airflow.hooks.base.BaseHook
Connects to the Tableau Server Instance and allows to communicate with it.
Can be used as a context manager: automatically authenticates the connection when opened and signs out when closed.
- Parameters
site_id (str | None) – The id of the site where the workbook belongs to. It will connect to the default site if you don’t provide an id.
tableau_conn_id (str) – The Tableau Connection id containing the credentials to authenticate to the Tableau Server.
- get_conn()[source]¶
Sign in to the Tableau Server.
- Returns
an authorized Tableau Server Context Manager object.
- Return type
tableauserverclient.server.Auth.contextmgr
- get_all(resource_name)[source]¶
Get all items of the given resource.
- Parameters
resource_name (str) – The name of the resource to paginate. For example: jobs or workbooks.
- Returns
all items by returning a Pager.
- Return type
tableauserverclient.Pager
- get_job_status(job_id)[source]¶
Get the current state of a defined Tableau Job.
- Parameters
job_id (str) – The id of the job to check.
- Returns
An Enum that describe the Tableau job’s return code
- Return type
- wait_for_state(job_id, target_state, check_interval)[source]¶
Wait until the current state of a defined Tableau Job is target_state or different from PENDING.
- Parameters
job_id (str) – The id of the job to check.
target_state (TableauJobFinishCode) – Enum that describe the Tableau job’s target state
check_interval (float) – time in seconds that the job should wait in between each instance state checks until operation is completed
- Returns
return True if the job is equal to the target_status, False otherwise.
- Return type