Server
koheesio.integrations.spark.tableau.server.TableauHyperPublishMode #
koheesio.integrations.spark.tableau.server.TableauHyperPublisher #
TableauHyperPublisher(**data: Any)
Publish the given Hyper file to the Tableau server. Hyper file will be treated by Tableau server as a datasource.
Source code in src/koheesio/integrations/spark/tableau/server.py
datasource_name
class-attribute
instance-attribute
#
datasource_name: str = Field(
default=...,
description="Name of the datasource to publish",
)
hyper_path
class-attribute
instance-attribute
#
hyper_path: PurePath = Field(
default=..., description="Path to Hyper file"
)
publish_mode
class-attribute
instance-attribute
#
publish_mode: TableauHyperPublishMode = Field(
default=OVERWRITE,
description="Publish mode for the Hyper file",
)
Output #
Output class for TableauHyperPublisher
datasource_item
class-attribute
instance-attribute
#
datasource_item: DatasourceItem = Field(
default=...,
description="DatasourceItem object representing the published datasource",
)
execute #
Source code in src/koheesio/integrations/spark/tableau/server.py
koheesio.integrations.spark.tableau.server.TableauServer #
TableauServer(**data: Any)
Base class for Tableau server interactions. Class provides authentication and project identification functionality.
Source code in src/koheesio/integrations/spark/tableau/server.py
auth
property
#
auth: ContextManager
parent_project
class-attribute
instance-attribute
#
parent_project: Optional[str] = Field(
default=None,
alias="parent_project",
description="Name of the parent project on the Tableau server, use 'root' for the root project.",
)
password
class-attribute
instance-attribute
#
password: SecretStr = Field(
default=...,
alias="password",
description="Password for the Tableau user",
)
project
class-attribute
instance-attribute
#
project: Optional[str] = Field(
default=None,
alias="project",
description="Name of the project on the Tableau server",
)
project_id
class-attribute
instance-attribute
#
project_id: Optional[str] = Field(
default=None,
alias="project_id",
description="ID of the project on the Tableau server",
)
site_id
class-attribute
instance-attribute
#
site_id: str = Field(
default=...,
alias="site_id",
description="Identifier for the Tableau site, as used in the URL: https://tableau.my-org.com/#/site/SITE_ID",
)
token_name
class-attribute
instance-attribute
#
token_name: Optional[str] = Field(
default=None,
alias="token_name",
description="Name of the Tableau Personal Access Token",
)
token_value
class-attribute
instance-attribute
#
token_value: Optional[SecretStr] = Field(
default=None,
alias="token_value",
description="Value of the Tableau Personal Access Token",
)
url
class-attribute
instance-attribute
#
url: str = Field(
default=...,
alias="url",
description="Hostname for the Tableau server, e.g. tableau.my-org.com",
examples=["tableau.my-org.com"],
)
user
class-attribute
instance-attribute
#
user: str = Field(
default=...,
alias="user",
description="Login name for the Tableau user",
)
version
class-attribute
instance-attribute
#
version: str = Field(
default="3.14",
alias="version",
description="Version of the Tableau server API",
)
working_project
property
#
working_project: Union[ProjectItem, None]
Identify working project by using project
and parent_project
(if necessary) class properties.
The goal is to uniquely identify specific project on the server. If multiple projects have the same
name, the parent_project
attribute of the TableauServer is required.
Notes
Set parent_project
value to 'root' if the project is located in the root directory.
If id
of the project is known, it can be used in project_id
parameter, then the detection of the working
project using the project
and parent_project
attributes is skipped.
Returns:
Type | Description |
---|---|
ProjectItem object representing the working project
|
|
execute #
validate_project #
validate_project() -> TableauServer
Validate when project and project_id are provided at the same time.