TACO Toolkit Reference


🕐 4 min read

This topic contains information to help you understand the TACO Toolkit and its associated command-line interface (CLI).

Overview

The TACO Toolkit is a set of tools that helps simplify Tableau web data connector development. It contains a command-line interface (CLI) to create and publish Tableau web data connectors and a software development kit (SDK) that enables you to develop your connectors efficiently.

Prerequisites

The TACO Toolkit requires that you have the following installed on your machine:

TACO development scripts (taco-scripts)

The TACO Toolkit project has standard npm support for development. It provides three npm scripts from the local taco-toolkit dependency.

// connector/package.json
"scripts": {
  "build": "taco-script build",
  "clean": "taco-script clean",
  "start": "taco-script start"
}

You can use npm commands under the /connector directory for local development without worrying about the global taco CLI version.

npm run build
npm run clean
npm start

taco-scripts build

The build script generates the runtime artifacts of a connector, including the JS bundle of app and handlers, and connector.json, which contains the connector configurations.

taco-scripts clean

The clean script removes all artifacts generated from build.

taco-scripts start

The start script starts an EPS server and loads the connector from the built taco project. You can use this script for testing a connector during local development.

Note: The EPS server doesn’t consume any TACO infrastructure files. It's only used for testing the EPS connector logic.

TACO global commands (taco-cli)

taco create

taco create creates a TACO project with a boilerplate type option.

You can use the boilerplate TACO project as the starter to develop your own TACO connector.

Usage:

taco create <project-name> --boilerplate earthquake-data

taco create also provides git support. The command can initialize a taco project a git repo when --git option is present.

taco create <project-name> --boilerplate earthquake-data --git

taco build

taco build is a wrapper of taco-scripts build, which allows you to run build at the root level of a TACO project.

taco build also provides a --clean option that removes all existing artifacts in the project and reinstalls dependency packages before performing the build.

taco build --clean

taco clean

taco clean is a wrapper of taco-scripts clean, which allows developers to run clean at the root level of a TACO project.

By default, taco clean only removes the artifacts related to EPS connector. It also provides a few options to clean other generated sources.

--include-optional  remove the optional taco infrastructure files (e.g. manifest.xml)
--include-log       remove taco CLI log files
--all               remove all generated taco files and directories

taco start

taco start is a wrapper of taco-scripts start, which allows developers to run build at the root level of a taco project.

taco pack

taco pack packs a taco-built project into a .taco file, which contains a connector’s runtime artifacts generated from the taco build command. The .taco file can be tested with Tableau apps and be used for distribution.

Usage:

cd taco-project
taco pack

taco pack have 3 stages:

To perform a single stage operation, you can use the corresponding flag:

taco pack --prepare // only perform prepare stage
taco pack --validate // only perform validation stage

You may also skip the prepare stage with --skip-prepare, when you have any manual modification on the taco files.

taco run

taco run launches a Tableau app with loading the taco connector(s) under a certain directory. The target taco connector has to be built and packed. The default taco directory is the current working directory.

taco run Desktop --version near

taco run Desktop --version 2022.3 --taco-dir 'path/to/taco/dir'

You can also specify a Tableau app’s executable file path with --app-path. When --app-path is provided, the tableau-app-name argument and --version option will be ignored.

taco run --app-path '/Applications/Tableau Desktop near.app' --taco-dir 'path/to/taco/dir'

taco unpack

The unpack command unpacks the .taco file into the current directory. It unzips the taco file.

taco unpack earthquake-data.taco

The unpack command unpacks the earthquake-data.taco into the earthquake-data directory in the command’s current working directory. The command returns an Error if there’s already an earthquake-data directory.