Skip to content

Scriptability

New Version 3.0

Version 3 of Scriptability is a major rewrite that is not backwards compatible. It introduces a new folder structure for exports and imports, a new mapping file format, and strict naming conventions. If you have older version of scriptability content you will need to re-export that content to use the new structure.

Scriptability allows user to simplify and automate the export and import of ThoughtSpot content via TML.

The following are the primary use cases for the scriptability tool:

  1. Export content for version control in git or other version control system.
  2. Migrate content between clusters and orgs.
  3. Make multiple copies of content, such as creating variations for different customers.
  4. Backing up content before deleting.

Scriptability has been tested with a variety of complex scenarios. However, some scenarios may not have been tested for and fail. Please provide feedback, new feature ideas, errors, and unsupported scenarios by entering a new issue.

This tool creates and updates content. Regular shapshots are recommended!

When importing content, it is possisible to accidentally overwrite content or create multiple copies of content when you didn't intend to, just by using the wrong parameters. You should make sure you have a snapshot prior to making large changes.

It's also recommended that you use git or other version management system to track changes to the TML.

Scriptability enforces content rules

You must have at least the Can Manage Data privilege in ThoughtSpot to use scriptability.

When exporting TML, you will need content permissions to the content to be exported.
When importing the TML it will be created as the authenticated user from the configuration.

This version of cs_tools scriptability supports the following:

  • All TML types and connections can be exported and imported with or without related content
  • You can specify the specific content to be exported and imported.
  • Orgs are supported for those instances where it's being used.
  • You can tag and share content after it's imported.
  • You can get a list of the GUID mappings between environments.

Limitations

  • All of the general TML limitation apply when using the scriptability tool.
  • Users without RLS or Admin privileges won't download RLS rules when exporting. It is recommended to use highly privileged users when exporting TML.
  • The author of new content is the user in the config file, not the original author.

The following are some known issues when using the tool:

  • There are rare scenarios where there is content you can access, but not download. In these cases you will get an error message.

In general, any changes that break dependencies are likely to throw errors.

CLI preview


Changelog

v3.0.0     2022-09-12

  • Reworked the import and export commands to have simpler parameters.
  • Added a new TML file system with specific folders for each type of content along with new ands for working with the TML file system.
  • Added a new tool for view the GUID mapping with names and types.
  • Refactored the import code to be more modular and easier to maintain.
  • Multiple bug fixes.
Changes History
v2.0.0     2023-05-08
  • Import connections and SQL views
  • Support for Orgs
  • Updated mapping file format
  • Using new version of thoughtspot_tml
  • Multiple bug fixes
v1.4.1     2022-09-12
  • Fixed an error that would stop download if SQL views were used in earlier versions of ThoughtSpot. A message will be displayed, but the export will continue.
  • Fixed an error where worksheets weren't downloaded when exporting based on a filters, such as tags or owner.
v1.4.0     2022-09-01
  • Download tables and connections
  • Upload tables
  • Multiple bug fixes
v1.1.0     2022-07-19
  • Create an empty mapping file
  • Compare two TML files
  • Create content with automatic dependency handling
  • Update content with automatic dependency handling
  • Allow new and updated content to be shared with groups during import
  • Allow tags to be applied to new and updated content during import
v1.0.0     2022-04-15