Migrate or restore worksheets
You can export an entire ThoughtSpot worksheet in a flat-file format. After optional modification, you can migrate it to a different cluster, or restore it to the same cluster.
In ThoughtSpot, you can download Worksheets 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.
Starting in release 6.2, you can use this feature to export and import Worksheets with filters.
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 into the production cluster
-
Implementing metadata changes outside ThoughtSpot UI, such as replacing the underlying tables for the entire table, or replacing a single column from one table with a column in another table
-
Making bulk changes, such as mass renaming of objects defined by the worksheets, and managing duplicates
-
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 | Import |
---|---|
Can view permission on the Worksheet and all underlying tables. |
When not overwriting an existing Worksheet, you must have the can manage data permission. If updating a previously existing Worksheet, you must have the can manage data permission and can edit permission for the Worksheet. |
Export Worksheet
To export a worksheet, follow these steps:
-
Click Data on the top navigation bar.
-
Click the name of the worksheet you want to edit.
-
Click the More icon (more options) in the upper-right side of the screen.
-
From the menu, select Export Worksheet.
Here, we are downloading the Sales worksheet.
-
The worksheet downloads into your default directory.
You can access the downloaded
*.tsl
file, named for your worksheet either through the file system manager, or by clicking on the name of the downloaded file in the left bottom corner of your Internet browser.
Working with the Worksheet TSL file
You can change the TSL file that represents the Worksheet by editing its content. See TSL Worksheet specification for the full syntax of the TSL file.
Update a Worksheet
To update an existing worksheet, follow these steps:
-
Click Data on the top navigation bar.
-
Click the name of the worksheet you want to edit.
-
Click the More icon in the upper-right side of the screen.
-
From the menu, select Update Worksheet from file.
Here, we are uploading the edited Sales worksheet.
-
In the upload interface, click Browse your files.
-
In your file system, find and select the TSL file.
-
In the Update worksheet interface, click Upload.
-
If you constructed the Worksheet file correctly, the Upload Worksheet interface displays an Upload successful message.
-
To examine the updated Worksheet, click Go to Worksheet.
Migrate a Worksheet
To migrate a Worksheet from one cluster to another, follow these steps:
-
Export the Worksheet you want to move, as in steps 1 to 5 of the Export Worksheet section above.
The Worksheet remains on the original cluster as well, unless you delete it.
-
Navigate to the cluster you want to add the worksheet to.
-
Click Data on the top navigation bar.
-
Click the More icon in the upper-right side of the screen.
-
Select Create worksheet from file.
-
In the Create Worksheet interface, click Browse your files.
-
In your file system, find and select the TSL file.
-
Click Upload.
-
If you constructed the Worksheet file correctly, the Create Worksheet interface displays an Upload successful message.
-
To examine the new Worksheet, click Go to Worksheet.
Related information