Migrate multiple TML files
You can migrate collections of Liveboards, Answers, Worksheets, views, and tables packaged together as a zip file. You can do this by importing and exporting TML files, ThoughtSpot’s solution for migrating data models (Worksheets, tables, and views) and content (Liveboards and Answers) between different environments, such as development and production. You can optionally edit these ThoughtSpot objects during the migration process.
Export related TML files
You can export your own custom zip file of related ThoughtSpot Modeling Language (TML) files from the Utilities page. Additionally, when you export more than one object of the same type at a time, or when you export an object and its dependents, ThoughtSpot exports it as a zip file.
To export your own custom TML file collections, follow these steps.
-
Navigate to the Utilities page: Data > Utilities.
-
In the Import/Export TML tile, select Export TML.
-
In the Export interface, select the Liveboards, Answers, views, tables, and Worksheets that you would like to include in your zip file of related TML files. For example, for a Marketing zip file, you might choose a Marketing Worksheet, a Campaigns Worksheet, a Pipeline Liveboard, and a few Answers your Chief Marketing Officer created.
-
Select Export n objects.
-
The Choose what to Export modal appears. Choose whether to export only the selected objects, or the selected objects and their associated objects (their underlying data sources: Worksheets, tables, and views).
-
Select Export.
-
Open the downloaded
TML
zip file. The zip file contains a document called theManifest
file, which defines the objects you exported, their underlying data sources, and any export errors. If an individual export fails, you can find an error message in theManifest
file. The zip file still exports, even if an individual object’s export fails.
See Import and export TML files for more information on exporting and importing objects.
Import related TML files
You can import your own custom zip file of related TML files from the Utilities page.
-
Navigate to the Utilities page: Data > Utilities.
-
In the Import/Export TML tile, select Import TML.
-
In the Import interface, click Select .zip or .tml files to upload.
-
In your file system, find and select the .zip file.
-
Deselect any files in the
.zip
file you do not want to upload. -
If you constructed the file correctly, the Import interface displays a Ready for import message for each TML file, and shows you which objects are validated.
-
When all your files are ready for import, you can now determine how to import the objects. The
GUID
parameter in an object’s TML file allows ThoughtSpot to recognize pre-existing GUIDs, and determine if you are updating an existing object, or creating a new one. If you are updating an existing object, the system asks if you would like to create a new object, or update the existing one. -
If there are errors in any of the objects you are importing, the Status column for the object is one of two states:
-
Ready for import and View Warnings, with a yellow exclamation mark: The object contains errors, but you can still import it. Either some visualizations or filters in the Liveboard have errors, or the destination tables for some joins in the table do not exist. If you import the object without fixing the errors, ThoughtSpot removes the Liveboard visualizations or filters or the table joins that contain errors. To view the errors, select View Warnings.
-
Cannot import and View Errors, with a red exclamation mark: The object contains errors, and you cannot import it. You must fix the errors. To view the errors and a suggested resolution, select View Errors.
-
-
Resolve any errors by selecting the Edit button for the object with errors. This opens the TML editor. Within the editor, resolve the errors using the method suggested under View Errors in the Import workflow.
-
After you resolve the errors, select Validate, and then Save. Exit the TML editor.
-
Select the objects you want to import. ThoughtSpot automatically selects objects with no errors, but does not select objects with errors, even after you resolve them. You must select those objects yourself.
-
Select Import n selected.
-
The Import Status screen displays the status of the objects you imported. You can open the object(s) that you imported, or select Exit to return to the main object page.