Ask
Ask examples
These endpoint examples apply only where Ask is enabled by the service configuration. Permissions and budgets still apply. Inspect generated plans and use explicit SQL when an exact query shape is required.
Start with the count recipe, which creates its own sample data. Use plan inspection next to see why an answer was returned. A natural-language response should be checked against the intended table, filter and result.
- Choose the tablesLimit the question to data your account can access.
- Ask in plain languageDescribe the count, filter or result you need.
- Inspect the planCheck which tables and conditions the question produced.
- Check the rowsCompare the answer with the underlying records.
Check natural-language questions
- Ask for a row count — Ask how many customers are in a table.
- Choose the tables Ask can use — Pass a schemas list to limit the tables Ask considers.
- Inspect how Ask answers — Request show_plan to see the operations used to answer the question.
- Check a question against a known join — Establish the result with explicit SQL, then compare an English question with it.
- Check plan reuse — Send the same question twice to see whether Ask reuses its compiled plan.
- Make a question answerable — Use an Ask error’s details to make the question more specific.
Before adapting a recipe
Use a test database, load the named sample data, and check the expected result. Read each page’s limits before changing the query. See connection and SDK notes.