TML for Spotter coaching

Use TML to modify a ThoughtSpot object in a flat-file format. Then, migrate the object to a different cluster, or restore it to the same cluster.

To work with TML files for coaching, you can download these objects to flat files in .TML format, modify the files, and subsequently upload the files either to the same cluster, or to a different cluster. To learn how to export, change, and update coaching, see Import and export TML files.

The syntax examples in this article contain every possible parameter in TML files for coaching. Some of these parameters are not in these files by default. If you want to use them, you must add them yourself. For example, the fqn parameter is not present in any TML file by default, but you can add it to differentiate a table from another table with the same name.

As you work with TML files, keep in mind that changing elements of the TML file, such as the name of a column or table, may affect dependents. This is specifically true if you are editing TML files outside ThoughtSpot. When you change the name of a table in a TML file, and then import that file into ThoughtSpot, ThoughtSpot automatically updates that table name in any dependents, such as Answers that use the table as a data source. However, if you download multiple TML files from one ThoughtSpot cluster, then change the table name in TML, and upload all the files to a brand-new cluster, ThoughtSpot doesn’t know that the dependents should use that table. You must also change the table name in the dependents.

Syntax of the coaching TML file

The TML file for coaching has a specific syntax.

See the TML parameters for coaching for details about the keywords used in this example.

You may not see each of these parameters in your own TML files, depending on whether each variable is explicitly defined.

guid: 90981592-6ad1-41bd-a0cf-130170e94913
nls_feedback:
  feedback:
 - id: "1"
    type: BUSINESS_TERM
    access: GLOBAL
    feedback_phrase: average
    parent_question: average of revenue over last 3 years
    search_tokens: "[average formula]"
    formula_info:
    - name: average formula
      expression: "group_average ( Revenue , Color )"
    rating: UPVOTE
    display_mode: UNDEFINED
    chart_type: KPI
    axis_config:
    - "y":
      - average formula
  - id: "2"
    type: BUSINESS_TERM
    access: GLOBAL
    feedback_phrase: average revenue
    parent_question: average of revenue over last 3 years
    search_tokens: "[average formula]"
    formula_info:
    - name: average formula
      expression: "group_average ( Revenue , Color )"
    rating: UPVOTE
    display_mode: UNDEFINED
    display_mode: KPI
    axis_config:
    - x:
      - Year
      "y":
      - average formula

TML parameters for coaching

These parameters and their definitions are specific to coaching; this list doesn’t contain every parameter in every TML file. Similarly, the parameter definitions may vary from object to object, since the parameters may have different roles in different objects.

a - i n - y
access

Defines the level of access of the coaching entry, either GLOBAL or USER.

axis_config

Contains information about which columns map to which axes. Generated by the system when the coaching was originally created. Do not modify.

chart_type

Generated by the system when the coaching was originally created. Do not modify.

display_mode

Generated by the system when the coaching was originally created. Do not modify.

expression

A string identifying the formula used in a coaching entry.

feedback

Marks the section containing the properties of the coaching. Contains the list of coaching entries created on the model.

feedback_phrase

The string denotes the natural language part of the coaching. For REFERENCE_QUESTION, this is the same as 'parent_phrase'. For BUSINESS_TERM, this is the fragment of the 'parent_phrase' that was mapped to the search tokens.

formula_info

A container for the name and expression of a formula used in coaching.

guid

The GUID of the Worksheet or Model the coaching was created on.

id

Uniquely identifies each individual coaching entry. Note that this ID is temporary for this particular file and is only used to help report errors and warnings during file upload.

name

The name of the formula used in the coaching entry.

nls_feedback

Parent container for the coaching entries in the TML file.

parent_question

Indicates the parent query from which the feedback_phrase is derived, in the case of BUSINESS_TERM feedback.

rating

Indicates whether the user Upvoted or Downvoted an AI-generated response.

search_tokens

Indicates the tokens for the coaching in TML form.

type

Identifies the type of coaching, whether BUSINESS_TERM or REFERENCE_QUESTION.

x

Denotes which column or search token is mapped on the x-axis.

"y"

Denotes which column or search token is mapped on the y-axis.


Related information