Editor

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.

Open the Editor

  1. In the sidebar, click Editor.
  2. Or, on the Dashboard, click the Editor card in Explore & analyze. The card reads "Query and explore your data".

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.

Find your way around the screen

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.

Show, hide and resize panels

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:

PanelSize range
Database Explorer15% to 35% of the Editor's width
Consoles20% to 50% of the Editor's width
Results Panel20% 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.

Continue a query from another screen

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.

Recover from an unexpected error

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.

Get access to the Editor

You need one of two permissions in the Query Editor category. Either one opens the Editor.

PermissionWhat it lets you do
Execute QueryExecute queries in consoles.
Add/Remove ConsolesManage query consoles.

Administrators can also give you one of three presets:

PresetIncludes
Query Editor AdministratorQuery Editor Contributor and Query Editor Executor, so both permissions above.
Query Editor ContributorAdd/Remove Consoles.
Query Editor ExecutorExecute Query.

Administrators grant these when they create or edit a role. See Roles and permissions and Permission reference.

Other features depend on further permissions:

Know what your queries can reach

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.

Important

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.

Questions, answered

I can't see Editor in the sidebar. Why?

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.

What is the difference between Query Editor Contributor and Query Editor Executor?

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.

Which data can I query?

The Lake and Warehouse tables your account may read, using your own access. See SQL dialect and data scope.

Why is there a console called New Console that I didn't create?

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.

A Mind gave me SQL. How do I continue in the Editor?

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.

Can I hide the side panels to get more room?

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.

Can I change how the Editor looks?

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.

Why don't I see the alert button in the editor toolbar?

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.

Are the panel sizes and visibility kept on my account?

No. They are remembered in this browser only. On another browser or computer, the Editor starts with both panels shown.