tableau

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

README

tableau

Usage

Note

To use tableau extractor, you need to enable metadata service api

source:
  type: tableau
  config:
    host: http://server.tableau.com
    version: 3.12
    identifier: my-tableau
    username: meteor_user
    password: xxxxxxxxxx

Inputs

Key Value Example Description
host string https://server.tableau.com The host at which tableau is running required
version string 3.12 The version of Tableau REST API, tested with 3.12 required
identifier string my-tableau Instance alias, the value will be used as part of the urn component required
username string meteor_user Username/email to access the tableau optional with auth_token and site_id
password string xxxxxxxxxx Password for the tableau optional with auth_token and site_id, required with username
sitename string testdev550928 The name of your tableau site, it will point to the default one if you leave it empty not required
auth_token string xxxxxxxxxx use auth_token to access tableau without username and password optional, required without username
site_id string xxxxxxxxx Add a site_id along with auth_token optional, required without username

Outputs

Field Sample Value
resource.urn tableau::{identifier}/workbook/{workbook_id}
resource.name workbook_name
resource.service tableau
resource.description a description of the dashboard
charts []Chart
Chart
Field Sample Value
urn tableau::{identifier}/sheet/{sheet_id}
source tableau
dashboard_urn tableau::{identifier}/workbook/{workbook_id}
dashboard_source tableau

Contributing

Refer to the contribution guidelines 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) CreateResource

func (cf *CloudFile) CreateResource(tableInfo Table) (resource *v1beta2.Resource)

type Config

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

Config that holds a set of configuration for tableau extractor

type Database

type Database map[string]interface{}

type DatabaseInterface

type DatabaseInterface interface {
	CreateResource(tableInfo Table) (resource *v1beta2.Resource)
}

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) CreateResource

func (dbs *DatabaseServer) CreateResource(tableInfo Table) (resource *v1beta2.Resource)

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) CreateResource

func (f *File) CreateResource(tableInfo Table) (resource *v1beta2.Resource)

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) CreateResource

func (wdc *WebDataConnector) CreateResource(tableInfo Table) (resource *v1beta2.Resource)

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