The Editor is where you write and run ClickHouse SQL against the Lake and Warehouse tables your account can read. Use it when you want to query data yourself, read the result in a grid, and chart or export it.
The first time you open the Editor, or whenever you have no open console, it creates a console named New Console and shows a Console created message.
The editor follows your DataMind OS theme, so it is light or dark with the rest of the interface. It has no font or colour settings of its own.
Compact and read-only boxes with the same editor appear in other screens' popups, such as SQL previews and embedded forms. Those screens own how their box behaves. For writing and checking SQL in the Editor described here, see Write and check SQL.
For the parts of the screen in detail, see Database Explorer, Consoles, saving and history and Editor reference: shortcuts and tools. To run your first query, follow Run your first query. For messages the Editor shows, see Editor troubleshooting.
Drag the border of a panel to resize it. Press Alt+1 to show or hide the Database Explorer, and Alt+2 to show or hide the Results Panel. Both panels are shown when the Editor opens.
Each panel keeps to its limits:
| Panel | Size range |
|---|---|
| Database Explorer | 15% to 35% of the Editor's width |
| Consoles | 20% to 50% of the Editor's width |
| Results Panel | 20% to 70% of the Editor's height |
If a remembered size sits outside its range, the Editor brings it back to the nearest limit.
Panel sizes and whether each panel is shown are remembered in this browser, not on your account. Only a drag on an expanded panel saves its size; the size a panel has while it is collapsed is not remembered.
A Mind's answer or an artifact can hand its SQL to the Editor with Open in Query Editor. The Editor opens a new console filled with that SQL; when the handoff comes from an artifact, the console takes the artifact's name. If the handoff names one of your own open consoles, the SQL opens in that console instead; otherwise the Editor prepares a new console for it. See Ask a Mind and Artifacts.
If the workspace hits an unexpected error, it shows Query editor crashed with "The query editor hit an unexpected error. The rest of the app is still running. You can retry to reload the workspace." Click Try again to reload the workspace, or View error details to read the error first. Console text is saved about a second after you stop typing, so it is normally still there after the reload. See Editor troubleshooting.
You need one of two permissions in the Query Editor category. Either one opens the Editor.
| Permission | What it lets you do |
|---|---|
| Execute Query | Execute queries in consoles. |
| Add/Remove Consoles | Manage query consoles. |
Administrators can also give you one of three presets:
| Preset | Includes |
|---|---|
| Query Editor Administrator | Query Editor Contributor and Query Editor Executor, so both permissions above. |
| Query Editor Contributor | Add/Remove Consoles. |
| Query Editor Executor | Execute Query. |
Administrators grant these when they create or edit a role. See Roles and permissions and Permission reference.
Other features depend on further permissions:
Queries run with your own access. You see only the Lake and Warehouse tables your account may read. The Role selector decides which of your roles' databases the Database Explorer, autocomplete and AI suggestions use. See SQL dialect and data scope.
Consoles are private. You see only the consoles you created, and there is no way to share a console with a colleague. Console text is saved about a second after you stop typing, and when you switch to another console. See Consoles, saving and history.
The Editor does not run queries while you view DataMind OS as another user. The banner Viewing as shows while you are in that view. Exit the view to run queries again. See Impersonate a user.
Your role needs Execute Query or Add/Remove Consoles in the Query Editor category. Ask an administrator to add one of them. Without either permission, the item is hidden and the page cannot be opened.
The Contributor preset gives you Add/Remove Consoles, which lets you manage consoles. The Executor preset gives you Execute Query. Query Editor Administrator gives you both.
The Lake and Warehouse tables your account may read, using your own access. See SQL dialect and data scope.
The Editor creates New Console when you open it with no open console. It is an ordinary console, so you can write in it or close it. See Consoles, saving and history.
Click Open in Query Editor under the answer. The Editor opens a new console with that SQL. When you open the SQL from an artifact, the console takes the artifact's name. If the handoff names one of your own open consoles, the SQL opens in that console instead. See Ask a Mind.
Yes. Alt+1 shows or hides the Database Explorer, and Alt+2 shows or hides the Results Panel. Your choice is remembered in this browser.
The editor follows your DataMind OS theme, so it is light or dark with the rest of the interface. It has no font or colour settings of its own.
The Create an alert from this query button appears only if your role has Create Alerts. Ask an administrator to add it if you need to create alerts from a query. See Create an alert.
No. They are remembered in this browser only. On another browser or computer, the Editor starts with both panels shown.