Running SQL queries from the dashboard

The Data Analyzer enables you to run optimized SQL queries on your ingested datasets. For SQL queries triggered from either the Data Explorer or the dashboard itself, on the Queries tab, you can view a list of SQL queries that have already been run or are in progress.

The dashboard:

  • only displays the queries that you have created or that have been shared
  • does not show SQL queries that you have run from a BI tool, such as Tableau

Starting a new query

You can create a new SQL query from the dashboard using the Run a new SQL query button. This enables you to create and run an SQL query on the data views you have permission to view.

To get the best performance from the Data Analyzer, you should use the SQL functions that have been optimized for use with the data ingested in the Platform and follow the guidelines for creating optimized queries. Refer to the Guidelines for using the Data Analyzer for details about how to optimize your queries.

You can also use the Data Explorer to create optimized SQL queries for the Data Analyzer; see Creating an SQL query from Data Explorer for instructions on how to create an SQL query based upon the multi-dimensional filter in the Data Explorer.

Viewing the results of a query

To view the results for one of your queries, click on its entry in the dashboard. The results page shows you the:

  • SQL query
  • AWS S3 bucket where you can find the full results of the query, in JSON Lines format
  • time taken to complete the query
  • first 100 records of the query results, in a table view that allows you to copy and paste directly into a spreadsheet

To open the Data Explorer visualization of this query, use the Explore... button. This opens the data view in the Data Explorer with the map (bounding box), time range and property filters used in the query.

If you would like to re-run a query, but with some modifications, such as modifying a geofence radius, or moving the bounding box, you can do this using the Explore… button, which takes you back to the Data Explorer view that you originally saved the query from. There you can use the interactive tools to move the map, change filters, or whatever you need, and then use the Show query button to save and run a new query.