Run your first query
This guide takes you from the sign-in page to a saved query. It assumes CH-UI is already running and can reach a ClickHouse server. If it is not, start with Installation.
Sign in
Section titled “Sign in”- Open CH-UI in your browser, for example
http://localhost:3488. - Under Connection, pick the ClickHouse server you want to query.
- Type your ClickHouse Username and Password. CH-UI sends them straight to ClickHouse; it does not keep its own passwords.
- Click Connect.
If your team uses single sign-on, click Sign in with SSO instead. If the page refuses you, see Can’t log in.
Open a query tab
Section titled “Open a query tab”You land on Home. Open an editor in any of these ways:
- Click Run Query in the page header.
- Press ⌥N (Mac) or Alt+N.
- Click the + button at the end of the tab bar.
To switch to another ClickHouse server later, click the status dot near the bottom of the rail on the left.
Find a table
Section titled “Find a table”- Click the Query icon (a terminal) at the top of the rail. The schema explorer opens next to it, listing your databases.
- Expand a database to see its tables.
- Click a table to open it in its own tab with a preview of its rows, or open
the table’s actions menu and pick Query Table. That opens a query tab
with
SELECT * FROM <table> LIMIT 1000ready to run.
Run it
Section titled “Run it”- Write or edit your SQL in the editor.
- Click Run, or press ⌘↵ (Mac) or Ctrl+Enter.
- The results appear under the editor, with the row count and duration in the result tab. Click a column header to sort, or use the footer to export the rows as CSV, JSON, Parquet and more.
When the editor holds several statements, Run runs the one under the cursor. ⇧⌘↵ or Shift+Ctrl+Enter runs them all, each in its own result tab.
Save it
Section titled “Save it”- Click Save in the editor toolbar, or press ⌘S or Ctrl+S.
- Give the query a Name. A description and a folder are optional.
- Pick who sees it under Visible to: Everyone or Only me.
- Click Save.
The query now shows on the Saved Queries page (Explore in the rail). Open it from there to run it again. Saved queries also feed dashboards, schedules and alerts.
- Build your first dashboard from this query.
- SQL Workspace covers every editor feature: parameters, history, Explain, uploads and more.
