🕐 4 min read
This topic contains information to help you understand the TACO Toolkit and its associated command-line interface (CLI).
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.
The TACO CLI provides a global way to create and build a TACO project that contains your connector source code. The CLI can also pack a built TACO project into a Tableau TACO connector (the .taco file).
The TACO SDK provides application programming interfaces (APIs) to help you develop your TACO projects (the source code). The SDK also provides some npm scripts, which allow you to build and test your projects with the standard npm commands.
The EPS is started by the TACO CLI or the npm scripts to load and test your connector source code.
The TACO Toolkit requires that you have the following installed on your machine:
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 buildThe 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 cleanThe clean script removes all artifacts generated from build.
taco-scripts startThe 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.
taco-cli)taco createtaco 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 buildtaco 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 cleantaco 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 starttaco start is a wrapper of taco-scripts start, which allows developers to run build at the root level of a taco project.
taco packtaco 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:
.taco file for the given TACO projectTo 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 runtaco 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 unpackThe 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.