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
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 embedded into any react application and configured to proxy requests to a local or remote Trino cluster.
4
+
5
+
> [!WARNING]
6
+
> This package is under heavy development and is not yet recommended for production workloads. Treat the current release as an early-stage demo; production-ready builds and documentation will follow soon.
1. Install Node.js (v20 or newer) from <https://nodejs.org/en/download/>
40
+
2. Install the dependencies and run the dev server:
41
+
```
42
+
cd precise
43
+
npm install
44
+
npm run dev
45
+
```
94
46
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?
47
+
The local URL will be displayed, and you can open it in your browser.
100
48
101
-
### Setup Proxying to Local Trino Instance
49
+
### Set Up Proxying to a Local Trino Instance
102
50
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.
51
+
Update `vite.config.ts` with the following so that queries can be properly proxied to Trino's query endpoint running on `http://localhost:8080`(or any other path you require).
The local URL will be be displayed which you can open in your browser.
136
-
137
74
### Building the Parser
138
75
139
-
To build parser: `npm run antlr4ng`, as configured in **package.json**
76
+
Run `npm run antlr4ng` to build the parser, as configured in **package.json**.
140
77
141
-
### Linting and code formatting
78
+
### Linting and Code Formatting
142
79
143
80
To check code quality and formatting:
144
81
145
82
```shell
146
83
npm run check
147
84
```
148
85
149
-
This command runs both eslint and prettier, as defined in **package.json**
86
+
This command runs both ESLint and Prettier, as defined in **package.json**.
150
87
151
88
## Philosophy
152
89
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:
90
+
This UI's purpose is to provide an environment where, once the cluster is up, you can immediately execute queries and explore data sets. The intended use cases are:
154
91
* Initial proof-of-concept queries.
155
92
* Exploration of data sets.
156
93
* Performance analysis.
157
-
*Adhoc query execution.
94
+
*Ad hoc query execution.
158
95
* Quickly enabling a data engineering team to start work before other integrations are in place.
159
96
* Early demos.
160
97
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
98
+
The approach:
99
+
1. Direct integration into the Trino UI
100
+
- No need for an additional authentication hop (although it could be added in the future)
101
+
-Authenticates as the user executing the query when using OAuth2
165
102
- 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 blackbox 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
103
+
2.Remove friction so you can simply write a query
104
+
- Autocomplete understands the Trino language, tables, and columns
105
+
-Provides syntax highlighting and validation
106
+
-Offers a comprehensive catalog explorer
107
+
3.Avoid black-box query execution
108
+
- Show progress and execution details. People ask "why is my query slow?" mostly because they only see a spinner for minutes.
109
+
- Link to the Trino Query UI to drill into query performance
110
+
- Show stages and split counts like the Trino console client
111
+
4.Keep the experience easy to navigate
175
112
176
113
### Gaps and Future Direction
177
114
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.
115
+
*Saving queries and using source control require either backend capabilities in the Trino service or leveraging Trino to write queries as tables.
179
116
* 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 wellcould 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.
117
+
* Basic graphing capabilities are still missing—looking at a table alone is not enough even for inspecting data sets.
118
+
* No LLM copilot integration yet. Many query UIs implement this poorly, but, done well, it could make query crafting fast and help translate from other query languages.
119
+
* Parameters and string replacement are only partly implemented in `SubstitutionEditor` and should support both SQL parameters and string replacement.
0 commit comments