Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

Updated on 2026-10-03

Queries screen — a question in plain language becomes SQL

The /query screen — the assistant that turns a question into SQL with an estimated cost, and the list of saved datamarts — with the literal label of each button and what the AI does and doesn't do.

On this page (7)

Interface inventory: the text here is the text on screen.

Where it is: menu AI → Queries (address /query).

Title Queries, subtitle "Turn questions into SQL and create datamarts with a cost estimate for each run, before you spend on processing."

You don't need to know SQL: you write what you want to see, the AI proposes the query, and you check it before saving. A datamart is that saved query, with a name, to reuse in the console or in a dashboard.

Queries screen: the How it works box, the Describe what you want to see field, the Examples, and the Generate SQL button

Turn a question into a query#

  1. 1. Write the question

    In the Describe what you want to see field, write in plain language — for example "revenue by month for the last 6 months". The buttons under Examples fill the field with sample questions.

  2. 2. Click Generate SQL

    While generating, the button shows "Generating…".

  3. 3. Check the proposal

    Under Proposed query you'll see the Tables: used, the SQL, the Explanation in plain language, and the Estimated cost per run. "Nothing was run on your datalake."

  4. 4. Name it and save

    Fill in Datamart name (e.g., Monthly revenue) and click Save as datamart. It appears under Saved datamarts, at the bottom of the screen.

The proposal appears right below the question field, in the Proposed query box: first the Tables: used, then the SQL, the Explanation, the Estimated cost per run, and, at the end, the Datamart name field with the Save as datamart button.

Write a good question#

The How to write a good question section (collapsed) has four tips:

TipWhy
State the periodWithout a period, the query scans everything and costs more.
State the breakdown"by channel", "by store" — that's what becomes the grouping.
State the measure"revenue", "average ticket" — use the name your company uses.
One request at a timeTwo questions in the same sentence usually turn into confusing SQL.

What the AI does — and what it doesn't#

The How it works box says, before you ask:

  • "The AI PROPOSES the SQL and explains what it does. The proposal is a draft for you to review."
  • "RUNNING is a separate action: it follows your permission and the SQL review. Generating runs nothing."
  • "No credential, password or key is sent to the model — the egress policy strips them before the call."
  • "Columns marked as personal data are not included in what is sent to the model."

Generating and saving don't run anything

Generating the SQL doesn't run anything, and neither does saving: after you save, the screen responds "Saving doesn't run the query or refresh any dashboard." To actually run it, use the Data console or a dashboard.

The Where this result stands block separates four stages that aren't the same thing: Processing, Quality, Materialization, and Dashboard refresh. Generating a query doesn't change any of them.

Cost#

  • The Estimated cost per run is a forecast, marked as an estimate — how much each run of the query should cost.
  • Each question to the AI uses a fraction of the month's AI usage limit. When there's a limit, the screen shows: "AI usage limit this month: … Already used: …".
  • If AI usage is blocked, the screen shows the reason and the next step at the top, and the Generate SQL button is disabled.

When the list is empty#

No datamarts yet — "Generate a query with the assistant above and save it to reuse."

Back to the app#

Next task#

Related links