Export reports and data

DataPrism can get a report or its numbers out of the product: a report as a PowerPoint or PDF file, a chart's full data as CSV, TSV or Excel, or a chart's data through the API for another system. Use this page to export a report or a chart, and to set up the API export. To email a report on a schedule, see Email subscriptions.

Export a report as PowerPoint or PDF

  1. Open the report and choose Export in the report header. In edit mode, Export sits in the More actions menu.
  2. Choose Export to PPTX or Export to PDF. Both appear only if you hold Export DataPrism Report Data, and both are disabled while either export runs.
  3. Keep the browser tab open and in front until the export finishes. The export pictures the report in your browser, so it cannot run in a background tab.

A notice titled "Exporting to PowerPoint" or "Exporting to PDF" tracks the run: "Preparing report", then "Rendering tiles" and a page counter such as "Capturing page 2 of 5". If you switch away, it reads "Switch back to this tab to continue the export"; return to the tab to let the export carry on.

When it finishes, the notice reads "PowerPoint exported" or "PDF exported" and the file downloads under the report's name. If it fails, the notice reads "PowerPoint export failed" or "PDF export failed" with the reason. See Troubleshooting for what to try.

The file holds the pages your viewers see, with hidden pages left out, and View as is honoured for rows and totals while it is on. The export reflects the saved report. PDF is built from the page pictures and PowerPoint from the tile pictures.

An export that finishes can still carry warnings. When there is more than one, the notice shows the first followed by a count, such as "2 more export warning(s)". The warnings name what was left out or changed:

Pictures have size caps: 4 MB for a tile picture, 8 MB for a page picture and 64 MB for the whole report. A picture that is too large is retried at a lower capture resolution; when it still does not fit, the export reports "Page 2 exceeds the page picture limit", "A tile on page 2 exceeds the tile picture limit" or "Page 2 exceeds the remaining report size budget".

An exported deck takes its colours from the report's theme; when the colours cannot be used, the slides use the built-in Light theme and the export warns: "The export body carries no usable slideTheme (background, ink and muted as #rrggbb); the built-in Light colours are used for the slides."

If a PDF export ends up with no page pictures at all, it is refused with "The pages list is empty: a PDF export needs at least one page picture."

To save the report itself rather than its output, choose Export as .dataprism from the same menu; it is always available. You can import that file as a new report. See Build a report.

Download the data behind a chart

  1. On a chart, open Export in its toolbar and choose Export CSV, Export TSV or Export Excel.
  2. On a table or matrix, pick a format under Download in the tile toolbar, then click the download button. Excel is the default there.

The file holds the whole result, not only the rows on screen, with the chart's saved filters and sort, and it is named after the chart. While a download runs, the menu entries are disabled; a check mark shows when it finishes. Slicer, slicer group, text box and image tiles do not offer a data download.

FormatContainsLimit
CSVThe whole resultNo row limit
TSVThe whole resultNo row limit
ExcelThe whole result1,048,575 rows

If the result has more rows than Excel allows, the download stops with a message telling you to download CSV instead.

Export a chart through the API

Every chart also has an export endpoint for another system: a script, a spreadsheet or a partner feed. You authenticate with one of two tokens.

TokenActs asWhere you make it
Personal access tokenYou, with your own access and row-level securityAPI tokens in your account menu, with the dataprism:export scope. See API tokens.
Chart tokenOnly the chart it was made on, with the rows you choseAPI access on that chart's tile

Open the export dialog

  1. On a chart tile, open Export and choose API access. On a table or matrix, the tile toolbar offers the same entry.
  2. Under Endpoint, the dialog shows the chart's export URL; click Copy URL. The description reads "Returns this chart as last saved, as CSV, JSON or Parquet. Results over 1,000,000 rows need ?async=1." Save the report before you copy, so the URL and the samples point at the saved chart.
  3. Under Authenticate with, check which token type fits. API guide opens ready-made samples for this chart.

Create a chart token

A chart token exports only this chart, for whoever holds it. Its access is fixed when it is made, as the dialog says: "Its access is fixed when it is made and lasts until it is revoked or expires."

  1. In the API access dialog, find Chart tokens and fill in New chart token.
SettingWhat it doesDefault
LabelNames the token in lists, for example Partner ETL.Empty
Expires afterWhen the token stops working: 1 day, 7 days, 30 days, 60 days, 90 days or Never.30 days
Rows the token returnsThe row-level security group the token is limited to, or All data (no row-level security). You must pick one when the model has row-level security.None
  1. Click Create chart token.
  2. In the Chart token created notice, click Copy token and store the token safely. It is shown once.
Warning

An All data token returns every row of this chart to whoever holds it, regardless of row-level security. Only make one for a system allowed to see all rows.

If tokens are not available on this chart, the dialog explains why in place of the form. Common reasons: missing permissions, or a model whose row-level security is SQL-based, where chart tokens are not available at all. See Row-level security and View as.

Read the API guide

API guide opens the samples for this chart, in two tabs:

Every sample can be copied. The filters samples warn: "Replace the values in angle brackets before you run it, or the request answers 400." The Sheets sample warns: "The token is visible to everyone who can open the formula. Use a chart token, never a personal one."

Call the export API

bash
curl -H "Authorization: Bearer YOUR_TOKEN" "YOUR_ENDPOINT?format=csv" -o chart.csv

Direct downloads stream the file while the query runs. They return up to 1,000,000 rows and use up to 600 seconds of query time, two downloads at a time per caller. Over that, a request is refused:

Async exports take the same request with ?async=1 on the plain download, or queue a job from the Async tab (a POST to the chart's exports route), and answer with a job instead of a file. Poll the job every 5 seconds; it ends succeeded, failed or expired. Then download the file within 24 hours of it finishing, and resume an interrupted download with a Range request. Async exports cover up to 3,600 seconds of query time and a 5 GB file, with 5 jobs per caller. As the guide notes, only whoever queued a job can poll and download it: the same user with any of their personal tokens, or the same chart token.

If a request is refused, the reason is in the response: 401 "The token is missing, unknown, revoked or expired."; 403 "The token is valid but not allowed to export this chart."; 404 "No such chart, or a chart token made for another chart."

Manage chart tokens

Open API access on a tile to see the chart's tokens. Each row shows the label, the start of the token, the rows it returns (for example RLS group Sales or All data), who created it, its expiry, when it was last used and how many times. An empty list reads "No chart tokens yet".

Permissions

PermissionWhat it allows
Export DataPrism Report DataExport a report to PPTX or PDF, download chart data as a file, and use the export API.
Manage DataPrism API TokensCreate chart tokens on a chart.

Chart tokens need both. See Who can do what in DataPrism.

Questions, answered

Why must I keep the tab open during a report export?

The export pictures the report in your browser. If you switch away, the notice reads "Switch back to this tab to continue the export", and a page that cannot be pictured in 45 seconds is reported in the warnings. Keep the tab in front and run the export again.

What do the export warnings mean?

The export still finishes; the warnings name what was left out or changed. When there is more than one, the notice shows the first followed by a count, such as "2 more export warning(s)". Common ones: a blank or missing page or tile picture, a custom visual that did not finish, text shortened to what the picture format can carry, and a page that could not be pictured in time.

Which pages does the exported file include?

The pages your viewers see. Hidden pages are left out, and View as is honoured while it is on.

Why is there no Export to PPTX or Export to PDF for me?

Both need Export DataPrism Report Data on a report you can see. Without it, Export offers only Export as .dataprism.

Does a chart download include all rows or only the rows on screen?

The whole result, with the chart's saved filters and sort. Only Excel stops earlier: a sheet holds at most 1,048,575 rows.

Why did my Excel download stop?

The result has more rows than an Excel sheet can carry. Download the same chart as CSV or TSV instead.

What is the difference between a personal access token and a chart token?

A personal token acts as you, with your access and row-level security, and can export any chart you can reach. A chart token belongs to one chart and carries the rows you fixed when you made it.

Can a chart token see all rows when row-level security is on?

Only an All data token, and only members of the Main group and administrators can make one. Every other token is limited to one RLS group you belong to. See Row-level security and View as.

Why can I not create a chart token?

The dialog shows the reason above the form. Common ones: you lack Manage DataPrism API Tokens or Export DataPrism Report Data; the model uses SQL-based row-level security, where chart tokens are not available; you belong to no RLS group on the model; or the group you picked has no condition a token can be limited to.

How long does a chart token last?

You choose at creation: 1 day, 7 days, 30 days, 60 days, 90 days or Never. The default is 30 days, and Never warns that the token keeps working until someone revokes it. Revoking stops it sooner; a revoked or expired token is refused with 401.

A chart token still works after its creator left. Why?

A token keeps the access it was created with and does not follow its creator. It stops only when someone revokes it or it expires; revoke the tokens of people who have left.

What if a chart has more than a million rows?

Use the async export: add ?async=1, or queue a job from the Async tab of the API guide. Poll it, then download the file within 24 hours. If the file has expired, queue a new export.