Examine SQL Queries (Workbooks)

Sigma’s Query history modal is a powerful tool if you want to better understand your Sigma generated SQL queries.

The modal displays an overview of recent queries, their runtime and current status. You can deep dive into individual queries to view their underlying SQL or investigate errors.

Summary of Content

View Recent Queries
View an Individual Query
Query Status Types
Query Runtime Breakdown
Pause and Resume Queries
Related Resources

View Recent Queries

The query history modal displays recent queries run from your open document within the existing session.
Your document’s individual query list will automatically show each query’s status, action type, start time and run time.

  1. Click the caret (▼) button next to the refresh data button in the workbook's header.

  2. Click Query history.
    Screen_Shot_2022-02-10_at_8.57.20_AM.png

View an Individual Query

  1. Click the care (▼) button next to the refresh data icon button in the workbook's header.
  2. Click Query history....
    Screen_Shot_2022-02-10_at_8.57.20_AM.png
  3. Click the query you would like to learn more about.
    Screen_Shot_2022-02-10_at_8.59.29_AM.png
  4. Explore the query detail view:
    • View and copy the Sigma generated SQL.
    • If the query failed, an error will also be displayed below Query Details.
      Screen_Shot_2022-02-10_at_9.00.05_AM.png

Query Status Types

Symbol

Status

Description

Screen_Shot_2020-06-15_at_5.03.48_PM.png

Completed

Your query ran successfully!

 Screen_Shot_2020-06-15_at_5.04.12_PM.png

Running

Your query is currently running.
By default, Sigma sets query timeouts to 120 seconds (2 minutes). Organization admins have the option to customize this per connection.

Screen_Shot_2020-06-15_at_5.03.55_PM.png

Errored

Something went wrong.
Open the query detail view to view the error message.

Screen_Shot_2020-06-15_at_5.04.00_PM.png

Paused

Queries are paused on your document.
To restart queries, click on the play button in your document toolbar.

Screen_Shot_2020-06-15_at_5.07.45_PM.png

Canceled

The query has been canceled.
This may happen if additional changes are made to your document before the query is run. In such an instance, Sigma will run only the new query.

 

Query Runtime Breakdown

A detailed query runtime breakdown is available for successfully completed and timed out queries. Query runtimes can vary due to network traffic, queue delay, or data warehouse processing time. Sigma’s runtime breakdown allows you to see if and when your query encountered delays.

The runtime is broken into three parts: 

  • Queue Duration: the amount of time the query sits in Sigma’s queue prior to being sent to the warehouse.
  • Sigma runtime: the amount of time Sigma takes to process the query, excluding queue duration and warehouse time.
  • Warehouse runtime: the amount of time between when Sigma sends a request to your data warehouse and when it gets a response back. This is roughly the amount of time the warehouse spent running your query.

Note: Incomplete queries do not display a detailed runtime breakdown. This feature is also not available for download/export requests.

Pause and Resume Queries

You can pause queries to make changes to your document without automatically running queries against your warehouse.

  1. Click the caret icon next to the refresh/play button all the way to the left in your dataset’s toolbar.

  2. Click Pause queries or Resume queries.
    Screen_Shot_2022-02-10_at_9.01.00_AM.png

Related Resources

Examine Dataset Queries


Was this page helpful?
Yes No