📢 Read the latest Release Notes to learn what's new on Hunters! 💡

Query Analytics data

Prev Next

In SQL mode, pick the data type from the selector above the Resources panel.

Data type selector

Switching the data type discards your SQL and your AI prompt. If you have already written or run something, you are asked to confirm first. Builder mode always uses OCSF Data.

Analytics is PostgreSQL

Analytics SQL is PostgreSQL, not Snowflake, so function names differ. Errors start with PG Query syntax error:, and the real Postgres message is at the end.

  • A literal % can be read as a parameter placeholder and cause a confusing error. Write mod(a, b), not a % b.
  • Columns in ORDER BY must also appear in the SELECT list.
  • information_schema cannot be queried. Use the Resources panel to see tables and columns.

For what each table holds and how to join them, see Analytics tables reference.

Generate a query and a chart

On Analytics, the prompt box generates both the SQL and a chart. Describe the metric you want and select Generate SQL & chart. The button shows each stage as it runs: Planning the query…, Writing SQL… and so on.

Analytics prompt while running

When the build finishes, the SQL is typed into the editor and run, and the chart appears in the Widgets area:

Generated chart

  • Nothing is saved. Save the query, or add the chart to a dashboard, to keep it.
  • Switching the data type, or opening a saved query, while a build is running cancels the build.
  • A build that has not finished after 30 minutes is abandoned.

RAW Data has no AI generation yet; its prompt box is disabled with a Coming soon badge.