Skip to content

Document saved queries and the Query Assistant#5074

Open
shannonbradshaw wants to merge 5 commits into
viamrobotics:mainfrom
shannonbradshaw:shannonbradshaw/data-ai-agent
Open

Document saved queries and the Query Assistant#5074
shannonbradshaw wants to merge 5 commits into
viamrobotics:mainfrom
shannonbradshaw:shannonbradshaw/data-ai-agent

Conversation

@shannonbradshaw
Copy link
Copy Markdown
Collaborator

What

Documents two existing features of the in-app query editor that the data section did not cover.

On data/query-data.md, after the MQL section:

  • Save and reuse queries — saving MQL queries from the editor (the Save query button, the Saved/Recent sidebar tabs, org-wide visibility). States plainly that saving is MQL-only.
  • Get help writing queries with the Query Assistant — the Query Assistant (Beta), which turns a plain-language description into a query and works in both SQL and MQL.

On data/overview.md, aligns the existing "Query and explore" sentence to the product name (Query Assistant, Beta) and notes that saving is MQL-only.

Verification

All claims verified against the app source (app/ui/src/routes/(auth-required)/data/query/ and app/data/feature_models.go):

  • Save query button renders only in MQL mode; the createSavedQuery RPC accepts only MQL, so saving is MQL-only.
  • Saved queries are listed by organization ID (org-wide visibility).
  • The Query Assistant panel carries a BETA badge and its inference path handles both SQL and MQL.

Local checks pass: prettier, markdownlint, vale (0 errors/warnings/suggestions), and make build-prod.

🤖 Generated with Claude Code

Add two sections to the in-app query editor page (query-data.md): saving
and reusing MQL queries, and the Query Assistant (Beta), which writes SQL
and MQL queries from a plain-language description. Align the data overview
to use the product name and note that saving is MQL-only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 26, 2026

Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit ac8d648
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6a1862071fa356000888980b
😎 Deploy Preview https://deploy-preview-5074--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 33 (🔴 down 10 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label May 26, 2026
Comment thread docs/data/query-data.md Outdated

## Save and reuse queries

You can save MQL queries for reuse. To save a query, switch to MQL mode, click **Save query**, and give it a name. It appears under the **Saved** tab in the editor sidebar, next to a **Recent** tab of your recent queries. Saved queries are available to your whole organization. Saving is not available for SQL queries.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we say anywhere that saves queries can be used in TabularDataByMQL? The name of the saved query is what queryPrefixName refers to here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katiepeters can you elaborate?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind. Figured it out. Working on another commit.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katiepeters please look again.

shannonbradshaw and others added 2 commits May 26, 2026 18:59
Per review feedback: a saved query can be run from the data client by
passing its name as query_prefix_name to TabularDataByMQL, which prepends
the saved query to any stages you provide. Add a "Reuse a saved query"
section with Python and Go examples to query-data-from-code.md, and a
cross-link from the saved-queries section of query-data.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shannonbradshaw
Copy link
Copy Markdown
Collaborator Author

@katiepeters can you take a look at this again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants