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.
.tmlextension. However, you can import files from 6.2.1 and earlier, with a
.tslextension, to 6.3 and later environments with no issue.
|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.|
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:
Navigate to the Answer you want to export.
Click the three-dot icon, and select Export as .tsl.
To export multiple Answers at a time, follow these steps:
Navigate to the Answers page from the top navigation bar.
Hover over the Answers you want to export, and click the empty checkboxes that appear.
Select the Export button.
Choose whether to export only the Answers, or the Answers and their underlying data sources:
Open the downloaded
Edit the Answer
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:
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.
Navigate to the cluster you want to add the Answer to.
Select Answers on the top navigation bar.
Select the Import button in the upper-right side of the screen.
In the Import interface, click Select .tsl file to upload.
In your file system, find and select the
.tslfile. The file uploads automatically.
If you constructed the file correctly, the Import interface displays an Upload successful message.
To examine the new Answer, click Done.