### In-Progress Recipes Example Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/group-user-management-scim.html Shows an example of in-progress recipes, detailing their titles, descriptions, and associated external links. ```json { "recipesContainerViews": { "in_progress_recipes": { "type": "inProgressRecipes", "title": "In-Progress Recipes", "recipes": [ { "title": "Placeholder content until actual recipes are here", "text": "Easily incorporate merge fields and send a web link to your GetFeedback survey.", "externalLink": "https://www.getfeedback.com/help/merge-fields-track-responses" }, { "title": "Placeholder content until actual recipes are here", "text": "Easily incorporate merge fields and send a web link to your GetFeedback survey.", "externalLink": "https://www.getfeedback.com/help/merge-fields-track-responses" } ] } } } ``` -------------------------------- ### Saved Recipes Example Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/group-user-management-scim.html Provides an example of saved recipes, including titles, descriptions, and external links for further information. ```json { "recipesContainerViews": { "saved_recipes": { "type": "savedRecipes", "title": "Saved Recipes", "recipes": [ { "title": "Placeholder content until actual recipes are here", "text": "Easily incorporate merge fields and send a web link to your GetFeedback survey.", "externalLink": "https://www.getfeedback.com/help/merge-fields-track-responses" }, { "title": "Placeholder content until actual recipes are here", "text": "Easily incorporate merge fields and send a web link to your GetFeedback survey.", "externalLink": "https://www.getfeedback.com/help/merge-fields-track-responses" } ] } } } ``` -------------------------------- ### Recipe Examples: Saved Recipes Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/data-modeling-attributable-dimension Provides example content for saved recipes, including titles, descriptions, and external links. These serve as placeholders until actual recipes are available. ```json { "title": "Placeholder content until actual recipes are here", "text": "Easily incorporate merge fields and send a web link to your GetFeedback survey.", "externalLink": "https://www.getfeedback.com/help/merge-fields-track-responses" } ``` -------------------------------- ### Install Python Library Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/analyst-studio-notebook Installs a specified Python library for use within the current Notebook session. Replace 'library_name' with the actual package name. The installation is session-specific. ```python ! pip install library_name ``` -------------------------------- ### Populate Custom Calendar Table Example Data Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/connections-cust-cal-create This example shows sample data rows for populating a custom calendar table. The first column is the actual date, followed by various date attributes. This data can be customized for different languages (e.g., Spanish) and week start days (e.g., Monday). ```csv 2021-06-01,martes,junio,QTR1,YR2021,2,1,1,1,false,junio YR2021,QTR1 YR2021,1,1,1,1,1,1,1,2021-06-01,2021-06-08,1,2021-06-01,2021-07-01,1,2021-06-01,2021-09-01,1,2021-06-01,2022-06-01 2022-05-28,sábado,mayo,QTR4,YR2021,6,5,13,52,true,mayo YR2021,QTR4 YR2021,28,89,362,3,12,4,52,2022-05-23,2022-05-30,12,2022-05-01,2022-06-01,4,2022-03-01,2022-06-01,1,2021-06-01,2022-06-01 ``` -------------------------------- ### Retrieve OAuth Client Credentials JSON Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/connections-snowflake-oauth-client Example of the JSON object returned by the Snowflake system function to retrieve client secrets and IDs. This data is required to finalize the connection setup in the ThoughtSpot UI. ```JSON { "OAUTH_CLIENT_SECRET_2":"KqKBu0xOxPtmk+RKvNP0+eIAMlFxMsu8rRh6s5q1qLY", "OAUTH_CLIENT_SECRET":"KdKBb0aOxPzml+RJvMP1/eIEMlFxM/su6rPh2wLZ", "OAUTH_CLIENT_ID":"aOxPzmlRJvCP5eIUMlFxMbu6rJh7mTO=" } ``` -------------------------------- ### Connection TML File Syntax Example Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/tml-connections This snippet demonstrates the basic structure and key parameters of a TML file used for ThoughtSpot connections. It includes fields for GUID, connection name, type, authentication, properties (key-value pairs), and description. ```yaml guid: connection : name: type: authentication_type: [SERVICE_ACCOUNT, KEY_PAIR, OAUTH] properties: key: value: key: value: key: value: "" key: value: key: value: description: "Description of the connection" ``` -------------------------------- ### Install R Package Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/analyst-studio-notebook Installs a specified public R package into the R Notebook environment. Replace 'library_name' with the name of the R package you wish to install. ```r install.packages (“library_name”) ``` -------------------------------- ### Completed Recipes Example Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/group-user-management-scim.html Illustrates completed recipes with their titles, descriptions, and external links for reference. ```json { "recipesContainerViews": { "completed_recipes": { "type": "completedRecipes", "title": "Completed Recipes", "recipes": [ { "title": "Placeholder content until actual recipes are here", "text": "Easily incorporate merge fields and send a web link to your GetFeedback survey.", "externalLink": "https://www.getfeedback.com/help/merge-fields-track-responses" }, { "title": "Placeholder content until actual recipes are here", "text": "Easily incorporate merge fields and send a web link to your GetFeedback survey.", "externalLink": "https://www.getfeedback.com/help/merge-fields-track-responses" } ] } } } ``` -------------------------------- ### Analyst Studio: Basic Multi-Statement Query Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/analyst-studio-managing-database-connections Demonstrates a simple multi-statement query as seen within Analyst Studio. This example shows the basic structure without any appended query footers. ```sql SELECT 1; SELECT 2 ``` -------------------------------- ### Filter products not starting with a specific string Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/keywords-fr-FR The 'not begins with' operator excludes records where a text field starts with a given string. It supports OR logic for multiple excluded starting strings. ```ThoughtSpot Search product name not begins with 'pro' ``` ```ThoughtSpot Search product name not begins with 'pro' or 'sport' ``` ```ThoughtSpot Search product name not begins with 'pro' product name not begins with 'sport' ``` -------------------------------- ### Configure Navigation and API Endpoints Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/connections-cust-cal-update Sets up URLs for key navigation actions and API documentation. This includes sign-in, thank you pages, API docs, and upgrade paths, essential for user flow and developer integration. ```json { "newSessionUrl": "/sign-in", "inlineThankYouUrl": "/response/thank-you-inline", "apiDocsUrl": "/api", "upgradeUrl": "/upgraded" } ``` -------------------------------- ### Create and Iterate Over Arrays in Liquid Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/analyst-studio-querying-data Shows how to simulate arrays in Liquid by splitting a delimited string into an iterable collection for use in loops. ```Liquid/SQL {% assign food = 'candy,beans,pizza' | split: "," %} {% for item in food %} LEFT JOIN types_of_food {{ item }} ON {{ item }}.type = '{{ item }}' {% endfor %} ``` -------------------------------- ### Execute Multi-statement SQL Queries Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/analyst-studio-querying-data Demonstrates how to run multiple SQL commands in a single block by separating them with semicolons. This includes setting session variables, creating temporary tables, and performing final selections. ```sql SET TIME ZONE 'UTC'; SET search_path TO schema_name; CREATE TEMP TABLE temp1 AS ( SELECT email, company, LOCALTIME AS date FROM customers ); SELECT * FROM temp1; ``` -------------------------------- ### List Installed Python Libraries Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/analyst-studio-notebook Displays a list of all Python libraries currently installed and available within the active Notebook session. ```python %pip list ``` -------------------------------- ### Passthrough Function with Date Partitioning Example Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/connections-amazon-aurora-postgresql-passthrough Demonstrates a passthrough function using a window aggregate with date partitioning. It shows a potential error scenario if the date granularity in the search (e.g., MONTHLY) does not match the date truncation in the partition clause (e.g., 'week'). ```sql sql_int_aggregate_op ( "sum(count(distinct {0})) over (order by date_trunc('week',{1} ) rows between unbounded preceding and current row)", Stations ID, Dim My Date ) ``` -------------------------------- ### Natural Language Date Query Examples Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/keywords-ru-RU A collection of example queries demonstrating how to use various date-based temporal expressions in ThoughtSpot. These examples show how to filter and group data based on relative time periods like quarters, months, weeks, and specific date offsets. ```ThoughtSpot Search Query customers last quarter for each year customers last week by store sales last week for each month sales last week for each quarter sales last week for each year top 10 customers last year by sale by store for region west sales March sales May sales Monday revenue by month last year commission January sales by product month to date sales > 2400 sales by product month to date for each quarter sales by product month to date for each year commission by sales rep February 2014 commission monthly growth of revenue by receipt date monthly year-over-year sales 2 days ago visitors last 6 months for homepage visits > 30 by month sales 2 months ago by region sales 4 quarters ago by product name contains deluxe sales 4 weeks ago by store opportunities next 5 years by revenue sales 5 years ago by store for region west shipments next day by order appointments next month by day shipments next 7 days opportunities next n days for each month opportunities next 15 days for each quarter opportunities next 2 days for each week opportunities next 300 days for each year openings next 6 months location projected cost next 2 months for each quarter projected cost next 8 months for each year opportunities next 2 quarters by campaign projected sales next 2 quarters for each year shipments next 10 weeks by day meetings next 3 weeks for each month ``` -------------------------------- ### Install Bridge Client on Linux Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/connections-bridge Steps to install the Bridge Client package on Linux systems using the repository script and apt-get. ```bash curl -L https://packagecloud.io/install/repositories/modeanalytics/main/script.deb.sh | sudo bash sudo apt-get update sudo apt-get install mode-bridge ``` -------------------------------- ### Configure Query Headers using Liquid and SQL Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/analyst-studio-managing-database-connections Examples of using Liquid logic and SQL commands to modify query behavior, such as setting search paths or assigning query groups based on execution context. ```sql {% if is_scheduled == true %} SET query_group TO scheduled_queries; {% endif %} ``` ```sql SET SEARCH_PATH TO 'webapp'; ``` ```sql -- Run by {{ query_runner_email }} -- Run at {{ run_at }} {% if is_scheduled == true %} -- Scheduled run {% else %} -- Manual run {% endif %} ``` -------------------------------- ### Access API with Secrets Store (Python) Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/analyst-studio-notebook Demonstrates how to retrieve and use credentials stored in the Secrets Store to securely connect to external services. This example shows a typical session builder configuration. ```python from library_name import libraryname session = Session.builder.configs({ "account": "demoaccount", "user": "DEMO_SHARED_ACCOUNT", "password": protected_password, "database": "SOURCE_SAMPLE_DATA", "schema": "TCCP_DB1", "warehouse": "DEMO_WH", "role": "ACCOUNTADMIN" }).create() ``` -------------------------------- ### Implement Rank with Partition using Passthrough Functions Source: https://docs.thoughtspot.com/cloud/26.3.0.cl/connections-snowflake-passthrough Demonstrates how to implement a rank function with partitioning in ThoughtSpot. It shows both the raw passthrough function and the recommended approach of wrapping it in a group_aggregate to ensure compatibility with chasm/fan traps and filtering. ```ThoughtSpot Formula sql_int_aggregate_op ("rank() over (partition by {0} order by sum({1}) desc)", Account Region, Account Revenue ) ``` ```ThoughtSpot Formula group_aggregate(sql_int_aggregate_op ("rank() over (partition by {0} order by sum({1}) desc)", Account Region, Account Revenue ),query_groups()+{Account Region}, query_filters()) ```