Query Stats action codes reference

This is a comprehensive mapping between user actions in the ThoughtSpot application and the corresponding tasks that appear in query stats files.

Query stats in ThoughtSpot tracks different types of queries executed by the system, categorized by "Query Triggers" (also known as tasks). These triggers help identify what user action or system process initiated a particular query, which is crucial for billing, performance analysis, and usage tracking.

Query stats fields

Each query in the stats file contains relevant fields like:

  • query_trigger: The enum value indicating what triggered the query

  • context: Additional context information (often empty for datamanager queries)

  • user_id: GUID of the user who initiated the action

  • user_name: Display name of the user

  • connection_name: Data source connection used

  • query_string: The actual SQL query executed

User action to query task mapping

User Action Query Trigger Description

Edit an existing saved answer

ANSWER_EDIT

User modifies a saved answer, triggering query to show updated results

View/Load a saved answer

ANSWER_VIEW

User opens an existing saved answer

Perform a new search

SEARCH_DATA

User types a search query in the search bar

Add filter to answer/search

GET_FILTER_VALUES

User adds or modifies filters, requiring filter value lookup. It will have +ANSWER_EDIT +also in the query stats file as the answer is also modified.

User Action Query Trigger Description

Edit a liveboard

LIVEBOARD_EDIT

User modifies a liveboard (adding/removing visualizations, filters, etc.)

View/Load a liveboard

LIVEBOARD_VIEW

User opens an existing liveboard

Data exploration actions

User Action Query Trigger Description

Click "Explore" on a visualization

EXPLORE

User explores underlying data from a chart/table

View underlying data

UNDERLYING_DATA

User clicks "View underlying data" option

Drill down on data points

DRILL_DOWN

User drills down from context menu or chart elements

Export/Download actions

User Action Query Trigger Description

Download data (CSV, Excel, PDF)

DOWNLOAD

User exports data in various formats

SpotIQ and analytics actions

User Action Query Trigger Description

Run SpotIQ auto analysis

SPOTIQ_AUTO_ANALYZE

User initiates automated insights analysis

Run SpotIQ change analysis

SPOTIQ_CHANGE_ANALYSIS

User analyzes changes in data over time

Set up KPI monitoring

KPI_MONITOR

User creates or views KPI monitors

Mobile and API Access

User Action Query Trigger Description

Access via mobile app

MOBILE

User performs actions through ThoughtSpot mobile app

Access via REST API

APIS

Programmatic access via ThoughtSpot APIs

Others

User Action Query Trigger Description

Scheduled liveboard execution

SCHEDULED_PINBOARDS

Automated execution of scheduled liveboards

ThoughtSpot Sync operations

TS_SYNC

Data synchronization triggered by user through Seekwell

Report book generation

REPORTBOOK

User generates report books

Use Cortex features

CORTEX

User interacts with AI-powered features

Use Spotter search

SPOTTER

User performs natural language searches

Custom calendar

CUSTOM_CALENDAR

custom calendar

System Process Query Trigger Description

Connection setup/testing

CDW_CONNECTION

Connection Creation

Sample data

DATA_WORKSPACE_SAMPLE

samples data for tables

SQL Editor operations

SQL_EDITOR

SQL editor

dbt integration

DBT

dbt-related system queries

Search indexing

SAGE_INDEXING

System builds search indexes

Data sampling for search

SAGE_SAMPLING

System samples data for search optimization

SpotApps operations

SPOT_APPS

SpotApps operations

Row count statistics

ROW_COUNT_STATS

System collects table statistics

Caffeine operations

CAFFEINE

Internal caching system queries

Seed questions

SEED_QUESTIONS

System-generated example questions

Unknown/Default

UNKNOWN

Queries that don’t match other categories

Exceptions

These are some cases where the Query Trigger differs from the intuitive expectation

User Action Query Trigger Description

LIVEBOARD DOWNLOAD PDF

LIVEBOARD_VIEW

User downloads liveboard

SCHEDULED PINBOARD WITH PDF TYPE

LIVEBOARD_VIEW

User schedules liveboard with pdf type

GET_FILTER_VALUES ON LIVEBOARD

LIVEBOARD_EDIT

User applies filter on liveboard

GET_FILTER_VALUES ON ANSWER

ANSWER_EDIT

User applies filter on liveboard


Was this page helpful?