Preview and export a BI table
The Preview tab inside a BI table's popup shows the table's rows, so you can check what the table returns before you use it in a report. This page covers how to run the preview, refresh it and download its result; the popup around it, including saving, is described in Edit and save a BI table.
Open the preview
- Open the BI table in its popup: double-click it in the model's BI tables panel, or right-click it and choose Open.
- Switch to the Preview tab. It stays disabled until the table has been saved once; Edit and save a BI table covers saving.
- The preview starts on its own; the rows appear when the run finishes.
Preview is one of the popup's two tabs, next to Bi Table. For the previews in the model itself, including the model's Preview tab, see Semantic models and BI tables.
What the preview shows
- It runs as soon as the tab opens, and it keeps refreshing itself until the run finishes or fails. While the run is queued or running, the grid shows a loading state instead of rows.
- A preview loads up to the first 100 rows of the table.
- Columns come from the query's metadata; when the query reports none, they come from the first row of the result. Each column is matched to the table's column definitions, so headers show the column's BI type icon and values follow the column's format rules where they are set.
- If a run fails, a notification explains why, using the message the server sent; when there is no message, it reads Preview failed.
Run the preview again
- Use the toolbar's Refresh data control to run the preview again.
- Running it again while an earlier run is still going is safe: the newest run wins, and a slow earlier answer is ignored when it arrives, so it cannot replace the result or raise a notification.
Download the result
- Use the download control in the preview toolbar to save the preview as Excel, CSV, JSON or TSV.
- The file is named after the table (the popup's title); when there is no name to use, it falls back to
bi_table_preview.
- Downloads elsewhere in DataPrism, such as chart data and report exports, are described in Export reports and data.
Questions, answered
Why is the Preview tab greyed out?
The table has not been saved yet. The tab stays disabled until the first save; save the table, then open Preview. The save steps are in Edit and save a BI table.
How many rows does the preview show?
Up to the first 100 rows of the table.
How do I refresh the preview?
Use the Refresh data control in the grid's toolbar to run the preview again; each run reads the table again.
Why is the preview still loading?
A preview runs as a query, and the popup keeps refreshing it until the run finishes or fails. While the run is queued or running, the grid shows a loading state; the rows appear when the run finishes.
I refreshed while the preview was loading. Which result do I see?
The newest one. A slow earlier run's answer is ignored when it arrives, so it cannot replace the result or raise a notification.
Can I download what the preview shows?
Yes. Use the download control in the grid's toolbar; the file is named after the table and falls back to bi_table_preview when there is no name to use. Downloads elsewhere in DataPrism are described in Export reports and data.
Where do the preview's columns come from?
From the query's metadata; when the query reports none, from the first row of the result. Each column is matched to the table's column definitions, so the grid shows the column's BI type icon.
Why did the preview fail?
The notification carries the reason the server sent; when there is no message, it reads Preview failed. Run the preview again, and reopen the table if it keeps failing.
Can I use the preview to judge how much data the table reads?
No. The statistics that come with a preview can understate the data read, so treat the preview as a check of columns and sample rows rather than as a measure of a full query.