tableau

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

README

Tableau

Extract dashboard (workbook) metadata from a Tableau server.

Note: You must enable the Metadata API on your Tableau server for this extractor to work.

Usage

source:
  name: tableau
  config:
    host: https://server.tableau.com
    version: "3.12"
    username: meteor_user
    password: xxxxxxxxxx
    sitename: testdev550928

Configuration

Key Type Required Description
host string Yes URL of the Tableau server.
version string Yes Tableau REST API version (e.g. 3.12).
username string No (required without auth_token) Username or email for authentication.
password string No (required with username) Password for authentication.
auth_token string No (required without username) Personal access token for authentication.
site_id string No (required without username) Site ID, used with auth_token.
sitename string No Tableau site name. Defaults to the default site if empty.

Entities

  • Entity type: dashboard
  • URN format: urn:tableau:{scope}:workbook:{workbook_id}
Properties
Property Type Description
properties.id string Workbook ID.
properties.name string Workbook name.
properties.project_name string Project the workbook belongs to.
properties.uri string Workbook URI on the Tableau server.
properties.owner_id string Owner user ID.
properties.owner_name string Owner display name.
properties.owner_email string Owner email address.
properties.create_time string Creation timestamp (RFC 3339).
properties.update_time string Last update timestamp (RFC 3339).
properties.charts []object List of sheet/chart objects (see below).
Chart sub-fields
Field Type Description
urn string Sheet URN (urn:tableau:{scope}:sheet:{sheet_id}).
name string Sheet name.
id string Sheet ID.
source string Always tableau.
dashboard_urn string Parent workbook URN.
create_time string Sheet creation timestamp (if available).
update_time string Sheet last update timestamp (if available).

Edges

Type Source URN Target URN Description
derived_from Upstream table URN Dashboard URN One edge per upstream table connected to the workbook. Supports DatabaseServer, CloudFile, File, and WebDataConnector sources. MaxCompute JDBC connections are also detected automatically.
owned_by Dashboard URN urn:user:{owner_email} Ownership edge linking the workbook to its owner.

Contributing

Refer to the contribution guide for information on contributing to this module.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Init(ctx context.Context, cfg Config) (err error)
	GetAllProjects(ctx context.Context) (ps []*Project, err error)
	GetDetailedWorkbooksByProjectName(ctx context.Context, projectName string) (wbs []*Workbook, err error)
	// contains filtered or unexported methods
}

func NewClient

func NewClient(httpClient *http.Client) Client

type CloudFile

type CloudFile struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	ConnectionType string `json:"connectionType"`
	Description    string `json:"description"`
	Provider       string `json:"provider"`
	FileExtension  string `json:"fileExtension"`
	MimeType       string `json:"mimeType"`
	RequestURL     string `json:"requestUrl"`
}

func (*CloudFile) CreateResourceURN added in v0.13.0

func (cf *CloudFile) CreateResourceURN(tableInfo Table) string

type Config

type Config struct {
	Host      string `json:"host" yaml:"host" mapstructure:"host" validate:"required,url"`
	Version   string `json:"version" yaml:"version" mapstructure:"version" validate:"required"` // float as string
	Username  string `json:"username" yaml:"username" mapstructure:"username"`
	Password  string `json:"password" yaml:"password" mapstructure:"password" validate:"required_with=Username"`
	AuthToken string `json:"auth_token" yaml:"auth_token" mapstructure:"auth_token" validate:"required_without=Username"`
	SiteID    string `json:"site_id" yaml:"site_id" mapstructure:"site_id" validate:"required_without=Username"`
	Sitename  string `json:"sitename" yaml:"sitename" mapstructure:"sitename"`
}

Config that holds a set of configuration for tableau extractor

type Database

type Database map[string]any

type DatabaseInterface

type DatabaseInterface interface {
	CreateResourceURN(tableInfo Table) string
}

https://help.tableau.com/current/api/metadata_api/en-us/docs/meta_api_model.html

type DatabaseServer

type DatabaseServer struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	ConnectionType string `json:"connectionType"`
	Description    string `json:"description"`
	HostName       string `json:"hostName"`
	Port           int    `json:"port"`
	Service        string `json:"service"`
}

func (*DatabaseServer) CreateResourceURN added in v0.13.0

func (dbs *DatabaseServer) CreateResourceURN(tableInfo Table) string

type Extractor

type Extractor struct {
	plugins.BaseExtractor
	// contains filtered or unexported fields
}

Extractor manages the extraction of data from tableau server

func New

func New(logger log.Logger, opts ...Option) *Extractor

New returns pointer to an initialized Extractor Object

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error)

Extract collects metadata from the source. The metadata is collected through the out channel

func (*Extractor) Init

func (e *Extractor) Init(ctx context.Context, config plugins.Config) (err error)

type File

type File struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	ConnectionType string `json:"connectionType"`
	Description    string `json:"description"`
	FilePath       string `json:"filePath"`
}

func (*File) CreateResourceURN added in v0.13.0

func (f *File) CreateResourceURN(tableInfo Table) string

type Option

type Option func(*Extractor)

Option provides extension abstraction to Extractor constructor

func WithHTTPClient

func WithHTTPClient(hcl *http.Client) Option

WithHTTPClient assign custom http client to the Extractor constructor

type Owner

type Owner struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

type Pagination

type Pagination struct {
	PageNumber     string `json:"pageNumber"`
	PageSize       string `json:"pageSize"`
	TotalAvailable string `json:"totalAvailable"`
}

type Project

type Project struct {
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type Sheet

type Sheet struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type Table

type Table struct {
	ID       string   `json:"id"`
	Name     string   `json:"name"`
	Schema   string   `json:"schema"`
	FullName string   `json:"fullName"`
	Database Database `json:"database"`
}

type WebDataConnector

type WebDataConnector struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	ConnectionType string `json:"connectionType"`
	Description    string `json:"description"`
	ConnectorURL   string `json:"connectorUrl"`
}

func (*WebDataConnector) CreateResourceURN added in v0.13.0

func (wdc *WebDataConnector) CreateResourceURN(tableInfo Table) string

type Workbook

type Workbook struct {
	ID             string    `json:"id"`
	Name           string    `json:"name"`
	ProjectName    string    `json:"projectName"`
	URI            string    `json:"uri"`
	Description    string    `json:"description"`
	Owner          Owner     `json:"owner"`
	Sheets         []*Sheet  `json:"sheets"`
	UpstreamTables []*Table  `json:"upstreamTables"`
	CreatedAt      time.Time `json:"createdAt"`
	UpdatedAt      time.Time `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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