Migrate or restore answers

You can export an entire ThoughtSpot Answer in a flat-file format. After optional modification, you can migrate it to a different cluster, or restore it to the same cluster.

Scriptability for Answers and Pinboards is in beta. To enable Scriptable Answers and Pinboards, contact ThoughtSpot Support.

In ThoughtSpot, you can download Answers to a flat file in TSL, ThoughtSpot’s Scripting Language, modify the file, and subsequently upload this file either to the same cluster, or to a different cluster.

This mechanism supports several scenarios that you may encounter:

  • Migrating from a development environment to a production environment by downloading the file from the development cluster and uploading the same file to the production cluster

  • Implementing metadata changes outside ThoughtSpot UI, such as replacing the underlying data source for the entire Answer, or replacing a single column from one data source with a column in another data source

  • Reusing existing objects to build new objects, such as building two very similar objects based on a similar, pre-existing object.

Starting with ThoughtSpot release 6.3, ThoughtSpot Scripting Language (TSL) is called ThoughtSpot Modeling Language (TML). Files from version 6.3 and later have a .tml extension. However, you can import files from 6.2.1 and earlier, with a .tsl extension, to 6.3 and later environments with no issue.

Prerequisites

Export with dependents Export without dependents Import with dependents Import without dependents

View permission for the Answer. View permission on all underlying tables and Worksheets. For example, if an Answer is built on top of a Worksheet that is built on top of a View, you must have view permission for all of these objects.

View permission for the Answer.

If you are not overwriting the existing dependents, you must have the can manage data permission. If you are overwriting the existing dependents, you must have the can manage data permission, and edit permission on the dependents.

You must have view permission for the dependents that the Answer directly depends on. For example, if an Answer is built on top of a Worksheet that is built on top of a View, you must have view permission for the Worksheet, not the View.

Export Answer

You can export one Answer at a time, or export more than one Answer as a zip file. The zip file contains a document called the Manifest file, which defines the objects you exported, and their underlying data sources.

To export one Answer:

  1. Navigate to the Answer you want to export.

  2. Click the three-dot icon, and select Export as .tsl.

    Export an Answer

To export multiple Answers at a time, follow these steps:

  1. Navigate to the Answers page from the top navigation bar.

    The top navigation bar
  2. Hover over the Answers you want to export, and click the empty checkboxes that appear.

  3. Select the Export button.

    Export multiple objects
  4. Choose whether to export only the Answers, or the Answers and their underlying data sources:

    Choose what to export
  5. Click Export.

    Click Export
  6. Open the downloaded .tsl zip file:

    Zip file

Edit the Answer .tsl file

You can edit the Answer .tsl file before you import it. Refer to Answer TSL specification for the full syntax of the TSL file.

Update an Answer

To update an existing Answer, you must export the .tsl file, make any necessary changes, and then upload it as a new object. You cannot overwrite an existing Answer. Instead, you must create a new object.

Migrate an Answer

To migrate an Answer from one cluster to another, follow these steps:

  1. Export the Answer you want to move, as in steps 1 to 5 of the Export Answer section above.

    The Answer remains on the original cluster as well, unless you delete it.

  2. Navigate to the cluster you want to add the Answer to.

  3. Select Answers on the top navigation bar.

  4. Select the Import button in the upper-right side of the screen.

    Import an Answer
  5. In the Import interface, click Select .tsl file to upload.

    Select a file
  6. In your file system, find and select the .tsl file. The file uploads automatically.

  7. If you constructed the file correctly, the Import interface displays an Upload successful message.

  8. To examine the new Answer, click Done.

    Upload successful

Related information