Parameterize metadata objects

Parameterize metadata objects

In ThoughtSpot, metadata parameterization refers to the process of assigning variables to certain properties and fields within metadata objects such as Connections and Tables. These variables can have different values assigned for each Org context, which are applied dynamically at runtime, rather than relying on hardcoded static values.

Metadata parameterization with variables allows administrators to reuse and propagate the same metadata object across various Orgs and environments within a ThoughtSpot instance while maintaining a consistent data structure of objects across Orgs.

Before you begin🔗

  • Ensure that that variables are available on your instance. You can use the variable search API to get a list of variables.

  • Ensure that you have edit access to the Connections and Tables to which you want to assign variables.

How to parameterize objects🔗

You can update the properties of a Connection or Table to parameterize or remove parameterization by using one of the following options:

Parameterize object properties🔗

To parameterize one or more properties of a metadata object, use /api/rest/2.0/metadata/parameterize-fields API endpoint.

Note

The legacy endpoint /api/rest/2.0/metadata/parameterize is deprecated in 26.4.0.cl and later versions, and is replaced with the /api/rest/2.0/metadata/parameterize-fields endpoint.

Request parameters🔗

In your POST request body, include the following parameters:

ParameterDescription

metadata_type Optional

String. Type of the metadata object. Valid values are:

  • LOGICAL_TABLE for tables

  • CONNECTION for connections

  • CONNECTION_CONFIG for connection configuration objects

Note that this attribute is optional if a GUID is specified as metadata_identifier in the request. If you have specified the object name instead of the GUID, and multiple objects in your Org share that name, make sure to specify the metadata type.

metadata_identifier

String. ID or name of the metadata object.

field_type

String. Type of object property. Valid values are:

  • ATTRIBUTE for Tables

  • CONNECTION_PROPERTY for Connections

field_name

Array of strings. A JSON array of the name fields to parameterize.

For tables, use one of the following names, depending on the property that you want to parameterize:

  • databaseName

  • schemaName

  • tableName

For connection objects, specify the exact name of the field or property to parameterize. For example, accountName, role, and warehouse.

For connection configuration objects, you can parameterize only impersonate_user field.

variable_identifier

String. ID or name of the variable.

Example request🔗

curl -X POST \
  --url 'https://{ThoughtSpot-Host}/api/rest/2.0/metadata/parameterize-fields'  \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {AUTH_TOKEN}' \
  --data-raw '{
  "metadata_identifier": "eefd754f-7146-432d-9ad6-2c730264ecc8",
  "field_type": "ATTRIBUTE",
  "field_names": [
    "schemaName",
    "databaseName",
    "tableName"
  ],
  "variable_identifier": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "metadata_type": "LOGICAL_TABLE"
}'

If the API request is successful, ThoughtSpot returns a 204 response indicating that the variable has been successfully assigned to the specified object.

Remove parameterization🔗

To remove the variables assigned to a Connection or Table and restore static values, use the /api/rest/2.0/metadata/unparameterize API endpoint.

Request parameters🔗

In your POST request body, include the following parameters:

ParameterDescription

metadata_type Optional

String. Type of the metadata object. Valid values are:

  • LOGICAL_TABLE for tables

  • CONNECTION for connections

  • CONNECTION_CONFIG for connection configuration objects

Note that this attribute is optional if a GUID is specified as metadata_identifier in the request. If you have specified the object name instead of the GUID, and multiple objects in your Org share that name, make sure to specify the metadata type.

metadata_identifier

String. ID or name of the metadata object.

field_type

String. Type of object property. Valid values are:

  • ATTRIBUTE for Tables

  • CONNECTION_PROPERTY for Connections

field_name

String. The name of the field to parameterize.

For Table attributes, use one of the following options:

  • databaseName

  • schemaName

  • tableName

For connection objects, specify the name of the field or property for which you want to restore a static value.

For connection configuration objects, you can update only the impersonate_user field.

value

String. Value to assign to the object property. This will assign a static value and remove the variable from the object property.

Example request🔗

curl -X POST \
  --url 'https://{ThoughtSpot-Host}/api/rest/2.0/metadata/unparameterize'  \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {AUTH_TOKEN}' \
  --data-raw '{
  "metadata_identifier": "metadata_identifier2",
  "field_type": "ATTRIBUTE",
  "field_name": "field_name0",
  "value": "sales",
  "metadata_type": "LOGICAL_TABLE"
}'

If the API request is successful, ThoughtSpot returns a 204 response indicating that the variable has been successfully removed from the specified object.

© 2026 ThoughtSpot Inc. All Rights Reserved.