SQL results, charts and tables
Polaris shows its work. Every query it runs appears in the chat, and you can open the SQL, look at the rows, export them, and change the charts it draws.
SQL cards
Section titled “SQL cards”Each query shows up as a SQL card. From the card you can:
- View query to read the SQL, and Copy query to copy it.
- View results to see the rows.
- Export results to download them.
- Open in side panel or Edit in side panel to change the SQL and run it again yourself.
- Conditional formatting to color cells by value.
The chat keeps a preview of the first 100 rows of each result. Exports include every row.
Queries are read-only. Polaris cannot change your data.
Tables
Section titled “Tables”When a table is the clearest answer, Polaris shows one. A table card has Copy rows, Export data and View fullscreen.
Export formats
Section titled “Export formats”Export data and Export results offer CSV and Excel (XLSX).
Charts
Section titled “Charts”Polaris draws charts from query results. It picks the type that fits the data, and you can ask for a different one (“show this as a line chart”).
Chart types: bar, stacked bar (also as 100%), horizontal bar (also as 100%), line, area, stacked area (also as 100%), mixed bar and line, pie, donut, KPI card, scatter, and radar. Polaris can also draw maps and custom charts.
A chart card has these actions:
| Action | What it does |
|---|---|
| Edit chart | Change the type, title, axes, series, colors and number format. |
| Download as PNG | Save the chart as an image. |
| View data table | Show the rows behind the chart. |
| View SQL query | Show the query behind the chart. |
| Export data | Download the rows as CSV or Excel. |
| Add to story | Add the chart to a story. |
| Expand width | Show the chart wider. |
Edit a chart
Section titled “Edit a chart”Edit chart opens a dialog with these sections: chart type, chart title, X-axis, Y-axis, series (each with a color and a left or right Y-axis), Y-axis range, number format, value formatting, and, for KPI cards, a comparison pill.
A KPI card can show how the latest value changed from the previous one, as a percentage, a variation or an absolute difference. The query must return at least two rows in time order.
Number format cheat sheet
Section titled “Number format cheat sheet”The Number format field takes a d3-format specifier. Polaris formats the number as it is stored. Use Prefix for currency symbols and Suffix for percent signs and units.
| Specifier | Input | Output |
|---|---|---|
,.0f |
1234567.891 | 1,234,568 |
,.2f |
1234567.891 | 1,234,567.89 |
.1f |
42.46 | 42.5 |
.2s |
1234567 | 1.2M |
.3s |
0.000123 | 123µ |
+.1f |
3.14 | +3.1 |
.2e |
1234567 | 1.23e+6 |
d |
42 | 42 |
Common combinations:
| You want | Number format | Prefix | Suffix |
|---|---|---|---|
| US dollars with cents | ,.2f |
$ |
|
| A percentage stored as 42.5 | .1f |
% |
|
| Large counts, shortened | .2s |
||
| A value with a unit | ,.0f |
mg |
Ask about a chart
Section titled “Ask about a chart”Select text in an answer and press ⌘ L to add it to your next message. In a story, ⌘-click a block to add it to the chat.