You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+84-54Lines changed: 84 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,48 @@
1
1
# Trino Query UI
2
2
3
-
This Trino Query UI is a new UI component that can be integrated into Trino and run directly from the Trino installation at the `/query/` path. For testing, it can also be run separately and can proxy to a Trino running locally or elsewhere.
3
+
A reusable React component for executing queries against Trino. It can be
4
+
embedded into any React application and configured to proxy requests to a local
5
+
or remote Trino cluster.
6
+
7
+
> [!WARNING]
8
+
> This package is under heavy development and is not yet recommended for
9
+
> production workloads. Treat the current release as an early-stage demo;
10
+
> production-ready builds and documentation are planned.
@@ -88,19 +114,23 @@ Add `/query/` path. Note any path can be used:
88
114
89
115
## Development
90
116
91
-
### Setup the Coding Environment
117
+
### Build and run
92
118
93
-
Tested on Ubuntu and Windows.
119
+
1. Install Node.js (v20 or newer) from <https://nodejs.org/en/download/>
120
+
2. Install the dependencies and run the dev server:
121
+
```
122
+
cd precise
123
+
npm install
124
+
npm run dev
125
+
```
94
126
95
-
1. Install node.js <https://nodejs.org/en/download/> at least v20
96
-
2. Create an NPM enviroment using Vite: `npm create vite@latest`, pick *React*, then *Typescript*
97
-
3. In the precise folder, install monaco `npm install @monaco-editor/react`
98
-
4. Install Typescript Runtime for ANTLR4 `npm install antlr4ng` and the cli `npm install --save-dev antlr4ng-cli`
99
-
because <https://github.com/tunnelvisionlabs/antlr4ts> seems abandoned?
127
+
The local URL is displayed, and you can open it in your browser.
100
128
101
-
### Setup Proxying to Local Trino Instance
129
+
### Set Up proxying to a local Trino instance
102
130
103
-
To run outside of Trino, update the contents of the `vite.config.ts` with the following so that queries can be properly proxied over to Trino's query endpoint running on `http://localhost:8080` or any other proxy path required.
131
+
Update `vite.config.ts` with the following so that queries can be
132
+
proxied to Trino's query endpoint running on `http://localhost:8080` (or any
The local URL will be be displayed which you can open in your browser.
136
-
137
-
### Building the Parser
156
+
### Building the parser
138
157
139
-
To build parser: `npm run antlr4ng`, as configured in **package.json**
158
+
Run `npm run antlr4ng` to build the parser, as configured in **package.json**.
140
159
141
160
### Linting and code formatting
142
161
@@ -146,37 +165,48 @@ To check code quality and formatting:
146
165
npm run check
147
166
```
148
167
149
-
This command runs both eslint and prettier, as defined in **package.json**
168
+
This command runs both ESLint and Prettier, as defined in **package.json**.
150
169
151
170
## Philosophy
152
171
153
-
This UI's purpose is to provide an environment where once the cluster is stood up, executing queries and exploring data sets can be done right away. The idended use cases are:
172
+
This UI's purpose is to provide an environment where, once the cluster is up,
173
+
you can immediately execute queries and explore data sets. The intended use
174
+
cases are:
154
175
* Initial proof-of-concept queries.
155
176
* Exploration of data sets.
156
177
* Performance analysis.
157
-
* Adhoc query execution.
158
-
* Quickly enabling a data engineering team to start work before other integrations are in place.
178
+
* Ad hoc query execution.
179
+
* Quickly enabling a data engineering team to start work before other
180
+
integrations are in place.
159
181
* Early demos.
160
182
161
-
The approach taken:
162
-
1. Direct integration into Trino UI
163
-
- No need for additional authentication hop (although it could be added in the future)
164
-
- Auth as the user executing the query if using Oauth2
183
+
The approach:
184
+
1. Direct integration into the Trino UI
185
+
- No need for an additional authentication hop (although it could be added
186
+
in the future)
187
+
- Authenticates as the user executing the query when using OAuth2
165
188
- Trino does the heavy lifting
166
-
2. Don't need to think, just write a query
167
-
- Autocomplete must be aware of not just Trino language but tables and columns
168
-
- Syntax highlighting, validation
169
-
- Comprehensive catalog explorer
170
-
3. No black box query execution
171
-
- Show progress and details of execution: people ask "why is my query slow" but mostly this is because they are only shown a spinner for 10 minutes.
172
-
- Link to Trino query UI to drill into query performance
173
-
- Show stages and split counts like Trino console client
174
-
4. Easy to navigate
175
-
176
-
### Gaps and Future Direction
177
-
178
-
* The ability to save queries and use source control requires either back end capabilities in the Trino service or can utilize Trino to write queries as tables.
189
+
2. Remove friction so you can simply write a query
190
+
- Autocomplete understands the Trino language, tables, and columns
191
+
- Provides syntax highlighting and validation
192
+
- Offers a comprehensive catalog explorer
193
+
3. Avoid black-box query execution
194
+
- Show progress and execution details. People ask "why is my query slow?"
195
+
mostly because they only see a spinner for minutes.
196
+
- Link to the Trino Query UI to drill into query performance
197
+
- Show stages and split counts like the Trino console client
198
+
4. Keep the experience easy to navigate
199
+
200
+
### Gaps and future direction
201
+
202
+
* Saving queries and using source control require either backend capabilities
203
+
in the Trino service or leveraging Trino to write queries as tables.
179
204
* No autocomplete for the Trino function list.
180
-
* Basic graphing capabilities - looking at a table is not enough even for inspecting data sets.
181
-
* No LLM copilot integration yet, this is done badly in many query UIs and if done well could make query crafting very fast, and solve other issues like translation from other query languages.
182
-
* Parameters and string replace: this is partly implemented in `SubstitutionEditor` and should support both SQL parameters and string replacement.
205
+
* Basic graphing capabilities are still missing—looking at a table alone is
206
+
not enough even for inspecting data sets.
207
+
* No LLM copilot integration yet. Many query UIs implement this poorly, but,
208
+
done well, it could make query crafting fast and help translate from other
209
+
query languages.
210
+
* Parameters and string replacement are only partly implemented in
211
+
`SubstitutionEditor` and should support both SQL parameters and string
0 commit comments