Skip to content
Tutorials Center
My learning

Topics

Lesson 26 of 35 ยท Sharing and Security

Exporting, Subscriptions, Alerts and Embedding

Share Tableau views beyond the site: export to PDF, image and CSV, schedule subscriptions, set data-driven alerts, build view URLs and embed with Connected Apps.

Not everybody opens a dashboard on their own. Some people want a PDF in their inbox on Monday morning, some want a message when a number goes red, and some should never leave their own company portal. Tableau covers all three: export and download, subscriptions and alerts, and embedding.

Because Tableau runs outside this page, the application steps are instructions. The runnable code is a stand-in for the parts that are really just text and arithmetic: building view URLs with filters, checking an alert condition, and creating the signed token used by embedding. Every one of those can be tested in plain Python.

Exporting and downloading

On a published view, the Download button in the toolbar offers:

  • Image (PNG): the view as a picture, ideal for slides.
  • PDF: choose page size, orientation and the scope (this sheet or all sheets of the workbook). Dashboards print best when the sizes match the page.
  • PowerPoint: each sheet becomes a slide with an image.
  • Data: the Summary (the aggregated numbers in the view), Full Data (the underlying rows), or a Crosstab (CSV or Excel).
  • Tableau Workbook: the .twbx with the data included; this requires the right permission.

Whether a viewer sees each option depends on the capabilities in Permissions and Row-Level Security. If the data is confidential, deny Download Full Data and Summary Data and allow Download Image/PDF only.

Before you export a PDF, set the dashboard to a fixed size and check Page Setup (File menu) for layout and headers. An automatic size exports as whatever the browser window happened to be.

Subscriptions

A subscription emails a snapshot of a view or workbook on a schedule. The viewer clicks Subscribe (the envelope icon), picks the content, the schedule (set up by an administrator: for example Weekdays 07:00), and whether to include an image, a PDF or a link only. Key facts:

  • The snapshot uses the subscriber's permissions and row-level filters, so each person gets their own rows.
  • The view is saved with its current filters at the time you subscribe; use Custom Views to subscribe to a particular filter state.
  • Send even if empty can be switched off so that you receive nothing when a view returns no data. (Look for the option in the subscription dialog.)
  • Extracts refresh on one schedule and subscriptions run on another. If the subscription is at 07:00 and the extract refreshes at 07:30, you email yesterday's data. Schedule subscriptions after the refresh.

Data-driven alerts

An alert emails you when a measure crosses a threshold. On a view with a numeric axis, click the Alerts (bell) icon, pick the axis, a condition (above, above or equal, below, below or equal, equal) and a threshold, then a schedule: Frequency (for example hourly) and the maximum number of emails. Alerts work only on continuous numeric axes, and the data must be fresh: an alert on a stale extract fires on stale numbers.

The condition is simple arithmetic, and a good alert has a dead band so that a value hovering around the threshold does not send a message every hour.

Python Alert with a dead band

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Without the dead band the queue would trigger on hours 11, 13, 16 and 17. Tableau's own alerts do not include a re-arm threshold, so the practical equivalents are a sensible frequency setting and a threshold set a little beyond the "normal" range.

View URLs

Every view has a URL, and the query string can set filters, parameters and display options. The pattern for a view published to Cloud or Server is:

Text
https://<server>/#/site/<site>/views/<Workbook>/<Sheet>?<Field>=<Value>&:showVizHome=no

A few useful switches: Region=West filters by a field (spaces become %20 or +; separate several values by commas); :embed=y removes the header for embedding; :toolbar=no hides the toolbar; :refresh=yes forces a data refresh; and adding .pdf, .png or .csv to the view path returns that format. Build and encode URLs with a library rather than by hand:

Python Build a filtered view URL

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

(Example host; it is not a real server.) The comma and colon come out percent-encoded (%2C, %3A), which Tableau decodes. Note how the space in "Order Date" becomes %20, a classic source of broken links when URLs are assembled by hand.

Embedding

Embedding places a Tableau view inside your own web page or application. The modern way is the Embedding API v3, a web component loaded from the Tableau site's own script. A read-only sketch:

HTML
<script type="module"
        src="https://tableau.example.test/javascripts/api/tableau.embedding.3.latest.min.js">
</script>

<tableau-viz
    id="salesViz"
    src="https://tableau.example.test/t/acme/views/Sales/Overview"
    toolbar="bottom"
    hide-tabs>
</tableau-viz>

JavaScript can then change filters (applyFilterAsync), set parameters (changeParameterValueAsync), listen for events such as mark selection, and export. A page cannot run that in this lesson's editor, because the preview is sandboxed, so treat the snippet as read-only.

Authenticating embedded users

Embedded views need an identity. The safest, current method is Connected Apps with direct trust. Your application creates a JSON Web Token (JWT), a signed string that says "this is user X, allowed to use these scopes", and passes it to the embedded view. Tableau checks the signature using a secret you registered on the site, then treats the visitor as that user, so row-level security and permissions apply. Because the token carries the identity, you do not need a Tableau login screen.

A JWT is three base64url parts joined by dots: header, payload (the claims) and signature. The claims Tableau requires include iss (the connected-app client ID), sub (the Tableau username), aud (the fixed value tableau), exp (expiry, at most ten minutes ahead), jti (a unique ID for each token) and scp (the scopes, for example tableau:views:embed). The signature is an HMAC-SHA256 of the first two parts with the secret. Here is the real algorithm with dummy values, which you can run and check:

Python Create and verify a signed token

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Never put the secret in browser code. The token must be created on your server after your own login check, and each token should be short-lived and single-use.

Embedding the same service-account token for everyone gives everyone the same data. Use a token per user, with that user's name in sub, so row-level security works.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Subscriptions send you Monday data at 07:00, but the extract refreshes at 07:30. What happens?

    Schedules are independent. Place subscriptions after the refresh finishes.
  2. 2. In a Connected Apps JWT, which claim holds the Tableau user the visitor acts as?

    sub (subject) is the Tableau username. aud is the fixed audience 'tableau', jti is a unique token ID and scp lists scopes.
  3. 3. Where should the Connected Apps secret be used to sign tokens?

    Anyone who sees the secret can impersonate any user, so signing must happen server side.
  4. 4. Which URL parameter removes the Tableau header for a cleaner embed?

    :embed=y hides the header. :refresh=yes forces a data refresh, and a .pdf suffix requests a PDF.

Summary

  • Download views as image, PDF, PowerPoint, summary or full data, subject to permissions.
  • Subscriptions email snapshots on a schedule; run them after the extract refresh. Alerts fire when an axis value crosses a threshold.
  • View URLs accept filter, parameter and display options; encode them with a library.
  • Embed with the Embedding API v3 and Connected Apps: sign a short-lived JWT with HMAC-SHA256 on your server, one per user.
  • The Python stand-ins implement alert logic, URL building and token signing exactly.

Next: Extracts and Performance Tuning