How to create parameters in ThoughtSpot that take user input and use it in SQL queries?
Hello, I’m learning to use ThoughtSpot Worksheets and want to create parameters that allow users to input values (such as date ranges, regions, and numeric thresholds). These input parameters should be used in the SQL WHERE clause to filter the data dynamically.
For example, I want a query like this:
SELECT *
FROM sales_data
WHERE sale_date BETWEEN CAST('{{ start_date }}' AS DATE) AND CAST('{{ end_date }}' AS DATE)
AND region = '{{ region }}'
AND total_amount >= {{ min_amount }}
What is the best way to create these parameters in ThoughtSpot so that:
Users can input or select values?
These parameter values are correctly passed into the SQL query?
The query returns filtered results based on user input?
In this case, 'start_date', 'end_date', 'region', 'min_amount' are the parameters that users can pass the input values
3 Replies
Can you ask this in the in app Thoughtspot chat support?
Sorry didn't get you, you mean in Dev help channel?
No, there should also be chat support in ThoughtSpot app