SQL Query Editor
Use the Playground's SQL editor to easily explore data
Last updated
Use the Playground's SQL editor to easily explore data
Last updated
Open the SQL editor by navigating to an app and clicking SQL Query in the sidebar.
The Spice.ai Query Editor will suggest table and column names along with keywords as you type. You can manually prompt for a suggestion by pressing ctrl+space.
Start typing a SQL command, such as SELECT * FROM
As you type, the Query Editor will suggest possible completions based on the query context. You can use the arrow keys or mouse to select a completion, and then press Enter or Tab to insert it into the editor.
Examples of using the SQL suggestions:
Select the btc.blocks
table:
Type SELECT * FROM btc
and press Tab. The editor will suggest btc.blocks
as a possible table. Press Enter to insert it into the query.
Show the fields in the eth.recent_blocks
table:
Type SELECT * FROM eth.recent_blocks WHERE "
. The editor will list the fields in the table.
Ensure the AI SQL Completion button is toggled on.
Write a SQL comment describing your desired query:
E.g. -- Return the Ethereum block number that had the most cumulative gas fees paid from the past hour
Press Enter to move the cursor to the next line - this will trigger the auto-completion. It may take a few seconds to generate.
Press Tab to accept the AI-generated completion.
Chart Playground is an in-browser charting interface to quickly generate visualizations from queried data, such as time-series trends, variable relationships, and data distributions.
Click the chart bar icon to access the Chart Playground and view a recommended chart upon entry.
Use dropdown menus to change x-axis, y-axis, chart style. Bar, line, dot chart style are currently supported. Choosing only x or only y will default to a "bar style" distribution plot.
Resize the chart by dragging the handles at the top and right.
Download the chart by clicking the download button in the top-right corner.
The Chart Playground relies on an in-browser DuckDB instance with limited capacity. Try to reduce the size of the data if no chart is displayed.
AI Charting is a conversational chart interface that offers an AI-enhanced experience for visualizing queried data.
By asking a question about queried data, an interactive chart will be generated.
Click the chat bubble icon to enter the AI Charting interface.
Enter a question of the queried data in the input box. Specify variables and styles to get most ideal chart result. Hit enter or click submit button to generate the chart.
Utilize interactive features including hovering, zooming, box-select, etc.
If a question entered is not valid for the data, a recommended question will be shown. Click and try the recommended question or ask another question to generate a new chart.
Chart generation may fail if the question requires complex data manipulation or is not relevant to the data, as shown below.