Query Tool
💻 Query Tool
The Query Tool in ARPIA provides an environment to write, execute, and analyze SQL queries directly against datasets stored in repositories. It combines a SQL editor with a real-time results viewer, supporting both ad-hoc data exploration and validation of Data Objects before deployment.

The Query Tool combines a SQL editor with an integrated results viewer.
✅ Prerequisites
Access to the Query Tool is governed by the user's assigned Security Profile. Before using the Query Tool, confirm the following:
- A workspace administrator has assigned you a Security Profile that grants access to the Query Tool and to at least one repository in your ARPIA workspace.
- Your Security Profile grants the appropriate level of access on the target repository's Knowledge Grid nodes. Read-only versus read/write entitlements determine which result row cap applies (see Query Execution).
If you cannot access the Query Tool or a specific repository, contact your workspace administrator or follow the node access request flow.
To open the Query Tool: Navigate to ARPIA → Query Tool. The breadcrumb at the top of the page will read ARPIA / Query Tool once the tool is open.
🌟 Key Features
📝 SQL Editor
The editor is designed for productive query authoring and includes:
- Query tabs — work on multiple queries in parallel. Each tab (e.g.,
Query 1) can be closed with the×icon, and a+button opens a new tab. Tabs persist within the current session. - Status indicator — a status bar below the editor shows the current state (e.g.,
● Ready) so you always know whether a query is active. - Syntax highlighting for SQL keywords, identifiers, and literals.
- Auto-complete and query suggestions for table names, columns, and common SQL constructs.
Editor toolbar
The toolbar above the editor exposes the following actions, left to right:
| Button | Action | Shortcut |
|---|---|---|
| Query tips (ⓘ) | Opens a popover with usage guidance, including the result row caps and a link to the supported SQL syntax reference | — |
| Keyboard shortcuts (⌨) | Opens a popover listing all available keyboard shortcuts | — |
| ▶ Run | Executes the entire query in the active tab | Ctrl + Enter |
| Selection | Executes only the highlighted portion of the query | Ctrl + Shift + Enter |
| Format (✨) | Reformats the active query for readability (indentation, line breaks, keyword casing) | Ctrl + Shift + F |
| Save Query (💾) | Saves the current query for reuse across sessions | — |
| Load Query (📂) | Opens the saved-queries picker to load a previously saved query | — |
| AI Assistant (🪄) | Opens the Arpia Codex Assistant dialog for query generation and code-aware Q&A | — |

The Query tips popover summarizes execution limits and links to the SQL reference.
Keyboard shortcuts
| Shortcut | Action |
|---|---|
Ctrl + Enter | Run the entire query |
Ctrl + Shift + Enter | Run only the highlighted selection |
Ctrl + Shift + F | Format the active query |

All keyboard shortcuts available in the editor.
⚡ Query Execution
- Run the entire query with the ▶ Run button or
Ctrl + Enter. - Run only a highlighted portion with the Selection button or
Ctrl + Shift + Enter. - Result row caps:
- 1,000 rows for standard queries
- 5,000 rows for read-only queries
- The Query Tool supports ANSI SQL commands. A link to the supported syntax reference is available from the Query tips (ⓘ) popover in the editor toolbar.
📊 Results Viewer
Query results render in a tabular view with the following capabilities:
- Column sorting by clicking column headers.
- Copy — copy the result set to the clipboard.
- CSV download — export the result set as a CSV file for offline analysis.
🔗 Repository & Connection Management
Use the repository selector at the top of the side panel to choose which repository's tables are loaded into the editor for querying.
- The dropdown lists every repository available to your account, along with its size allocation (for example,
ARPIA_DEMO_REPO_BETA - 1G). - Selecting a repository loads its tables and columns into the panel below the selector. Each column displays its data type as a badge (
varchar,decimal,date,enum, etc.) for quick reference while writing queries. - You can switch repositories at any time without leaving the editor; the table panel refreshes to match the new selection.
- Use the Reload schema button (circular-arrow icon above the table panel) to refresh the schema view. This is useful when the repository has been updated outside the current session — for example, when objects have been added, removed, or modified — so the editor reflects the latest tables and columns.
- Use the Collapse pane button (
«double-chevron) to hide the schema panel and give the editor full width. When collapsed, a Show schema button (»double-chevron) appears in its place to restore the panel.

The repository selector lists every accessible repository with its size allocation.
💾 Saved Queries
Saved queries let you reuse SQL across sessions without retyping or re-pasting it.
To save a query:
- Click the 💾 Save Query button in the editor toolbar.
- In the Save Query dialog, enter a name in the Label for Query field.
- Click Save to persist the query, or Cancel to dismiss.

The Save Query dialog persists the active query under a label for later reuse.
To load or delete a saved query:
- Click the 📂 Load Query button in the editor toolbar.
- In the Load Saved Query dialog, open the Query to load dropdown and select a query.
- Click Load Query to load it into the active editor tab.
- To remove a saved query, select it in the dropdown and click Delete.
- Click Cancel to dismiss the dialog without changes.

The Load Saved Query dialog handles both loading and deleting saved queries.
Tip: The Delete button removes the selected saved query immediately. Re-save the query if you remove it by mistake.
🤖 Arpia Codex Assistant
Open the AI Assistant from the 🪄 AI Assistant button in the editor toolbar. The assistant — Arpia Codex Assistant — generates code with awareness of your knowledge grid and loaded tools, and can answer questions about a selected portion of code.
Using the assistant:
- Click the 🪄 AI Assistant button to open the AI Assistant dialog.
- In the prompt field, describe the code you want generated, or the question you want answered about your selected code.
- (Optional) Check Include selected code. to send the currently highlighted SQL from the editor to the assistant for context.
- Click ▶ Ask Codex to submit.
- Click Close to dismiss the dialog.
What the assistant can do:
- Generate SQL from a natural-language description of the desired result.
- Answer questions about a selected portion of code.
- Provide insights on existing queries with context from your knowledge grid and loaded tools.
The Include selected code. checkbox controls whether highlighted SQL is sent to the model along with your prompt. The prompt itself is always submitted when you click Ask Codex.

The Arpia Codex Assistant dialog generates SQL and answers questions about selected code.
For more on the Arpia Codex Assistant beyond the Query Tool, see Arpia Codex Assistant.
⚠️ Limitations
- Result row caps: 1,000 rows for standard queries, 5,000 rows for read-only queries.
- SQL dialect: ANSI SQL.
🎯 Common Use Cases
The Query Tool is typically used to:
- Explore datasets to understand structure and content before building Data Objects.
- Validate logic for views and transformations prior to deployment.
- Export results to CSV for reporting, sharing, or downstream analysis.
- Generate and explain queries using the integrated Arpia Codex Assistant.
🔧 Troubleshooting
| Symptom | Likely cause | Resolution |
|---|---|---|
| "Permission denied" on execution | Security Profile does not grant access to the target repository or Knowledge Grid node | Contact your workspace administrator, or use the node access request flow |
| Query times out | Result set too large or query not optimized | Add LIMIT, narrow the WHERE clause, or review indexes |
| Auto-complete shows no tables | Repository not selected, or schema not yet loaded | Select a repository from the dropdown and refresh |
| New or modified tables don't appear in the schema panel | Schema view is cached from when the repository was first opened | Click Reload schema (circular-arrow icon) above the table panel |
| Saved query is missing after using the Load dialog | Query may have been deleted via the Delete button in the Load Saved Query dialog | Re-save the query |
| CSV download is empty | Query returned zero rows, or export was triggered before execution completed | Re-run the query and wait for completion before exporting |
🔗 Related Topics
Updated 8 days ago
