tableau

package
v0.11.310 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDatasourceIDByName added in v0.11.267

func FindDatasourceIDByName(ctx context.Context, name string, datasources []DataSourceInfo) (string, error)

func FindWorkbookIDByName added in v0.11.267

func FindWorkbookIDByName(ctx context.Context, name string, workbooks []WorkbookInfo) (string, error)

Types

type BasicOperator

type BasicOperator struct {
	// contains filtered or unexported fields
}

func NewBasicOperator

func NewBasicOperator(conn config.ConnectionGetter) *BasicOperator

func (BasicOperator) Run

func (BasicOperator) RunTask

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c Config) (*Client, error)

func (*Client) GetDatasource added in v0.11.267

func (c *Client) GetDatasource(ctx context.Context) ([]DataSourceInfo, error)

func (*Client) GetHost added in v0.11.304

func (c *Client) GetHost() string

GetHost returns the Tableau host URL.

func (*Client) GetProjectDetails added in v0.11.304

func (c *Client) GetProjectDetails(ctx context.Context, projectID string) (*ProjectInfo, error)

GetProjectDetails returns detailed information for a specific project.

func (*Client) GetSiteID added in v0.11.304

func (c *Client) GetSiteID() string

GetSiteID returns the Tableau site ID.

func (*Client) GetViewDetails added in v0.11.304

func (c *Client) GetViewDetails(ctx context.Context, viewID string) (*ViewInfo, error)

GetViewDetails fetches detailed information about a specific view.

func (*Client) GetWorkbookConnections added in v0.11.304

func (c *Client) GetWorkbookConnections(ctx context.Context, workbookID string) ([]WorkbookConnection, error)

GetWorkbookConnections returns all data source connections for a specific workbook.

func (*Client) GetWorkbookDetails added in v0.11.304

func (c *Client) GetWorkbookDetails(ctx context.Context, workbookID string) (*WorkbookInfo, error)

GetWorkbookDetails returns detailed information for a specific workbook.

func (*Client) GetWorkbookViews added in v0.11.304

func (c *Client) GetWorkbookViews(ctx context.Context, workbookID string) ([]ViewInfo, error)

GetWorkbookViews returns all views (dashboards/worksheets) for a specific workbook.

func (*Client) GetWorkbooks added in v0.11.267

func (c *Client) GetWorkbooks(ctx context.Context) ([]WorkbookInfo, error)

func (*Client) ListAllViews added in v0.11.304

func (c *Client) ListAllViews(ctx context.Context) ([]ViewInfo, error)

ListAllViews returns all views (dashboards/worksheets) on the site.

func (*Client) ListDatasources added in v0.11.267

func (c *Client) ListDatasources(ctx context.Context) ([]DataSourceInfo, error)

func (*Client) ListProjects added in v0.11.304

func (c *Client) ListProjects(ctx context.Context) ([]ProjectInfo, error)

ListProjects returns all projects on the site.

func (*Client) ListWorkbooks added in v0.11.267

func (c *Client) ListWorkbooks(ctx context.Context) ([]WorkbookInfo, error)

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

func (*Client) RefreshDataSource

func (c *Client) RefreshDataSource(ctx context.Context, datasourceID string) error

func (*Client) RefreshWorksheet added in v0.11.251

func (c *Client) RefreshWorksheet(ctx context.Context, workbookID string) error

type Config

type Config struct {
	Name                      string `yaml:"name,omitempty" json:"name" mapstructure:"name"`
	Host                      string `yaml:"host,omitempty" json:"host" mapstructure:"host"`
	Username                  string `yaml:"username,omitempty" json:"username" mapstructure:"username"`
	Password                  string `yaml:"password,omitempty" json:"password" mapstructure:"password"`
	PersonalAccessTokenName   string `yaml:"personal_access_token_name,omitempty" json:"personal_access_token_name" mapstructure:"personal_access_token_name"`
	PersonalAccessTokenSecret string `yaml:"personal_access_token_secret,omitempty" json:"personal_access_token_secret" mapstructure:"personal_access_token_secret"`
	SiteID                    string `yaml:"site_id,omitempty" json:"site_id" mapstructure:"site_id"`
	APIVersion                string `yaml:"api_version,omitempty" json:"api_version" mapstructure:"api_version"`
}

func (Config) GetName

func (c Config) GetName() string

type ConnectionInfo added in v0.11.304

type ConnectionInfo struct {
	ID             string `json:"id"`
	Type           string `json:"type"`
	ServerAddress  string `json:"serverAddress,omitempty"`
	ServerPort     string `json:"serverPort,omitempty"`
	DatabaseName   string `json:"databaseName,omitempty"`
	UserName       string `json:"userName,omitempty"`
	ConnectionType string `json:"connectionType,omitempty"`
}

ConnectionInfo represents a data source connection in a workbook.

type DataSourceInfo added in v0.11.267

type DataSourceInfo struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type ExtendedWorkbookInfo added in v0.11.304

type ExtendedWorkbookInfo struct {
	WorkbookInfo
	Connections []WorkbookConnection `json:"-"`
	Views       []ViewInfo           `json:"-"`
}

ExtendedWorkbookInfo represents detailed workbook information with connections.

type OwnerInfo added in v0.11.304

type OwnerInfo struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type PaginationInfo added in v0.11.304

type PaginationInfo struct {
	PageNumber     string `json:"pageNumber"` // Tableau returns these as strings
	PageSize       string `json:"pageSize"`
	TotalAvailable string `json:"totalAvailable"`
}

type ProjectDetails added in v0.11.304

type ProjectDetails struct {
	ProjectInfo
	ParentProject *ProjectInfo  `json:"parentProject,omitempty"`
	ChildProjects []ProjectInfo `json:"childProjects,omitempty"`
}

ProjectDetails represents detailed project information with hierarchy.

type ProjectInfo added in v0.11.304

type ProjectInfo struct {
	ID                 string `json:"id"`
	Name               string `json:"name"`
	Description        string `json:"description,omitempty"`
	ParentProjectID    string `json:"parentProjectId,omitempty"`
	ContentPermissions string `json:"contentPermissions,omitempty"`
}

type RefreshResponse

type RefreshResponse struct {
	Status string `json:"status"`
}

type TSCredentials

type TSCredentials struct {
	Name     string `json:"name"`
	Password string `json:"password"`
	Site     TSSite `json:"site"`
}

type TSCredentialsResponse

type TSCredentialsResponse struct {
	Token string         `json:"token"`
	Site  TSSiteResponse `json:"site"`
	User  TSUser         `json:"user"`
}

type TSResponse

type TSResponse struct {
	Credentials TSCredentialsResponse `json:"credentials"`
}

type TSSite

type TSSite struct {
	ContentURL string `json:"contentUrl"`
}

type TSSiteResponse

type TSSiteResponse struct {
	ID         string `json:"id"`
	ContentURL string `json:"contentUrl"`
}

type TSUser

type TSUser struct {
	ID string `json:"id"`
}

type TableauResourceType added in v0.11.267

type TableauResourceType string
const (
	ResourceDatasources TableauResourceType = "datasources"
	ResourceWorkbooks   TableauResourceType = "workbooks"
)

type TagInfo added in v0.11.304

type TagInfo struct {
	Label string `json:"label"`
}

type TagsWrapper added in v0.11.304

type TagsWrapper struct {
	Tag []TagInfo `json:"tag,omitempty"`
}

type ViewInfo added in v0.11.304

type ViewInfo struct {
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	ContentURL   string        `json:"contentUrl"`
	ViewURL      string        `json:"viewUrl,omitempty"`
	WorkbookID   string        `json:"-"` // Set manually after fetching
	WorkbookInfo *WorkbookInfo `json:"workbook,omitempty"`
	Project      ProjectInfo   `json:"project,omitempty"`
	Owner        OwnerInfo     `json:"owner,omitempty"`
	Tags         *TagsWrapper  `json:"tags,omitempty"` // Tags are wrapped in an object
	CreatedAt    string        `json:"createdAt,omitempty"`
	UpdatedAt    string        `json:"updatedAt,omitempty"`
}

View represents a Tableau view/dashboard.

type WorkbookConnection added in v0.11.304

type WorkbookConnection struct {
	Datasource *DataSourceInfo `json:"datasource,omitempty"`
	Connection *ConnectionInfo `json:"connection,omitempty"`
}

WorkbookConnection represents the connection details for a workbook.

type WorkbookInfo added in v0.11.267

type WorkbookInfo struct {
	ID         string       `json:"id"`
	Name       string       `json:"name"`
	ContentURL string       `json:"contentUrl,omitempty"`
	WebpageURL string       `json:"webpageUrl,omitempty"`
	Project    ProjectInfo  `json:"project,omitempty"`
	Owner      OwnerInfo    `json:"owner,omitempty"`
	Tags       *TagsWrapper `json:"tags,omitempty"`
	CreatedAt  string       `json:"createdAt,omitempty"`
	UpdatedAt  string       `json:"updatedAt,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL