A chart, table or text on a slide can take its numbers from a SQL query on your Lake and Warehouse, instead of values you type. Use it when a deck has to show current figures, and read the roles section before you share the deck. To type the numbers yourself or format a chart, see Charts and tables.
SELECT . . . FROM "<role>_WH". "Sales".Check query checks the statement without running it. The column list appears only after a Run, because it comes from the last executed statement.
Table: select the table and click Enter data under Table. The Table data dialog shows the grid above the query panel. Click Bind to a query, then follow steps 4 to 8 above. Under Table columns, left to right, pick the result columns in order: the first column you pick fills the first table column, and so on. While a table is bound, its cells refresh from the result and cannot be typed over. Unbinding keeps the rows as plain cells you can edit.
Text: select the text and, in the Text section, click Bind to a query. The Text query dialog opens. The text shows the first cell of the result exactly as the query returned it. A run that returns more than one row or column still fills from the first cell and warns that only the first cell is used. An empty result writes a dash instead of the number.
| Setting | What it does | Default |
|---|---|---|
| Role | The role the query runs as. The query may read only that role's databases. | The first role you hold; it becomes part of the binding when you start writing SQL. |
| Refresh | When the query runs on its own. | Only when refreshed by hand |
| Category column and Series columns | Which result columns fill a chart's categories and series. | Empty until you choose them. |
| Table columns, left to right | Which result columns fill a table, in order. | Empty until you choose them. |
Bound to a query as {roleName|no role yet}. {n} rows held from the last run.Bound to a query as {roleName|no role yet}. The last fetched value is held as the text.Plain text. Bind it to a query to show a value from the warehouse.Written to this element, Nothing has been written to this element or Result of the previously run query. An empty answer reads That query returned no columns, so there is nothing to bind. or That query ran and matched no rows.Each refresh is one undo step, so Ctrl+Z puts the previous numbers back. A refresh by hand changes the deck, so the new numbers are saved with your next save. A whole-deck run is a single undo step however many elements it touched.
If a query fails when the deck opens, the notice Live data could not be refreshed appears with Those elements are showing the values saved with the deck., and the elements keep their saved values. Failures never block an export. For the messages behind a failed run, see Slides troubleshooting.
A bound query is pinned to a role, and that role decides where the deck can go.
"<role>_WH". "Sales". A table from another role is refused.. datamindslides file whose roles you do not hold removes its query bindings. Its charts keep their last numbers. See Export and import.A bound deck can be shared only with people who hold its required roles. Check Required roles before you publish.
SELECT or WITH. Statements that change data, such as INSERT, UPDATE or DROP, and table functions are refused.To write, check or run a query, and to refresh by hand, you need Bind Slide Chart To SQL. It is part of the Slide Chart SQL Binder bundle and is not in the Slides Editor preset. See Slides permissions. For the SQL rules, see SQL dialect and data scope.
Only the bound role's own databases, which the note under Role lists: the role's Lake, WH and Temp databases. Name every table in full, like "<role>_WH". or "<role>_Lake".. A table outside those databases is refused.
Check query checks the statement without running it, so it confirms the query stays inside the role's databases. Run shows rows in Query result without changing the element. Run and fill writes the result into the element. One query runs at a time.
The query still runs, but a run that cannot fill the element changes nothing. If no query is written, the panel flags the editor and asks for a role and a query first. If the mapping is incomplete, the panel asks for the columns it needs, for example Nothing was filled yet. Pick the category column and at least one series, then run it again.
Check query only checks the statement; it never runs the query. The column list comes from the last run, so run the query once first. The panel says so: Run the query once to read its result columns, then map them onto the chart.
Only if the element refreshes when the deck opens or when a show starts, and the viewer can open the deck and holds the role the query is bound to. Viewers cannot run ad-hoc SQL: the automatic runs use the queries saved in the deck's current version. Otherwise viewers see the values saved with the deck.
No. The refresh on open does not change the deck. If you have unsaved edits, the new numbers are saved with your next save. See Saving and version history.
Yes. Each refresh is one undo step, so Ctrl+Z puts the previous numbers back. A whole-deck run is a single undo step however many elements it touched.
No. A query is one statement that starts with SELECT or WITH. Statements that change data are refused.
A bound text keeps the first cell of the result exactly as the query returned it, so the formatting comes from the SQL. Round it, scale it or add units in the query, so the slide, the PDF and PowerPoint show the same characters.
The last run returned no value, so the text writes a dash rather than keeping a stale number. Change the query until it returns the value you want.