ThoughtSpot query comments

What are query comments?

ThoughtSpot uses query comments in order to support better debuggability from the data warehouses connected to ThoughtSpot, to support analytics and reporting by data warehouses, and to help optimize query performance. Query comments enable administrators to trace the specific ThoughtSpot activity that originates queries to their remote SQL databases.

You can use query comments to categorize or group queries by subject, department, or other criteria. This organization can make it easier to find and manage queries, especially in large analytics environments. Query comments can also be used to track the history and status of a query, as well as to document who created, modified, or reviewed it. Finally, query comments can be used to provide additional information about the data schema, data quality, or business rules underlying a query. This information can help troubleshoot errors or unexpected results.

When sending SQL queries to different databases, ThoughtSpot adds comments to the query indicating that the query originated from ThoughtSpot, and containing metadata information such as Liveboard ID, visualization ID, and user ID. ThoughtSpot query comments are not the same as Snowflake query comments, which are schema-level objects that can be assigned to another Snowflake object.

Sample query comments

The following example API is for all databases:

name:Untitled,
 owner:c9d0374f-b1b6-4f2e-a837-c4386db0e0f3,
 vizId: ce2e9b84-9047-4110-9b5a-3908aaff0911,
 userId: 59f2df6b-ad76-407d-8388-1e5dc221c513,
 tsQueryId: 59ac41ea-0761-497a-8011-154f73cc2230,
 clusterId: 41577fae-4b43-11ef-ad6d-357c3,
 task: SEARCH_DATA,
 connectionId : 91577eae-4b43-11ef-ad6d-357c3
 isRLSApplied: false*/
<query text>

Note that for Google BigQuery connections, rather than query comments, we use query labels.


Was this page helpful?