What this pack contains
31 tests for Tableau, built on the Tableau Cloud and Server Data Source Template version 3.0. They check what is usually wrong when someone says a dashboard is wrong: an extract stopped refreshing, a sheet shows a different number from the warehouse, a relationship key finds no match and its rows land under Null, a calculation fails, a sheet uses a field the data source no longer has, a filter hides rows from viewers who cannot see it, or a user filter shows someone the wrong region.
The folders are named by what the tests need, so you can see at a glance which ones will run on your site:
| Folder | Tests | Needs |
|---|---|---|
| 1 Any site role / Freshness | 3 | Any site role |
| 1 Any site role / What viewers see | 7 | Any site role with Export Data; Export Image and the image libraries for two; a warehouse data source for five |
| 2 API Access / Reconciliation | 4 | The API Access capability, plus a warehouse data source holding the same rows |
| 2 API Access / Data source integrity | 4 | The API Access capability; the two relationship tests also need Download |
| 3 Download / Change control | 7 | Download Data Source or Download Workbook; one needs only a site role |
| 4 Site Administrator / Operations | 3 | Site Administrator |
| 5 Connected app / Row-level security | 3 | A connected app to act as the user; API Access for one, Download for one |
Each test's description starts with a Requires: line naming its tier. Testing Tableau with Validatar: What Works on Which Site Role explains the tiers and what to ask your Tableau administrator for.
Each folder below has its own job:
| Job | Runs | VizQL Data Service queries |
|---|---|---|
[Samples] Tableau - 1 Any site role |
the 1 Any site role folder | none |
[Samples] Tableau - 2 API Access - Reconciliation |
the Reconciliation folder | about 11 |
[Samples] Tableau - 2 API Access - Data source integrity |
the Data source integrity folder | about 21 |
[Samples] Tableau - 3 Download |
the 3 Download folder | none |
[Samples] Tableau - 4 Site Administrator |
the 4 Site Administrator folder | none |
[Samples] Tableau - 5 Connected app |
the 5 Connected app folder | about 3 |
There is no job that runs everything, because on a site with one Creator license the two API Access jobs do not fit in the same hour. See The VizQL Data Service budget.
Marketplace: Tableau Sample Tests
This pack replaces the Tableau Server/Online - Example Tests, which were written for the 1.x template. Those tests call get_view_data_as_df, remove_formatting_from_numeric_columns and TSC.CSVRequestOptions. Version 3.0 of the template keeps all three, so the old tests also run on a 3.0 data source while you move to these.
How the tests are built
Every test is a short Python script that calls the template's own helpers (resolve_datasource, resolve_view, view_data, measure_value, relationship_orphans, missing_fields, refresh_jobs and so on) and leaves a data frame for Validatar to judge. Five shapes recur:
- Count of problems. The script returns how many problems it found, and the test passes at zero. Every template test in the pack works this way.
- Detail. The script returns one row per problem with a LOCATION, a DETAIL and a VALUE. The control is an empty table, so every row is a failure. Integrity - Orphan keys on the Product relationship lists each key with no match and how many rows carry it.
- List. The script returns KEY and VALUE rows and the Control script returns the approved list: the data source filters, the workbook's views, the refresh schedules, the user filters.
- Reconciliation. The Test side reads Tableau, either a sheet's summary data or a query on the published data source. The Control side is SQL on the warehouse data source. Values must agree within 0.01%.
- Drift. The script returns numbers and the control is the average of the test's own last ten runs. The first run has no history and passes; it seeds the window.
Template tests fan out over the catalog
Eight tests are template tests. Each one has a metadata filter on the catalog schema, such as SchemaName starts with Data Sources:, and materializes one child test per matching catalog object. The child test's script receives the object through {{schema.name}} and {{table.name}}, so Change - Every sheet's fields exist in its data source becomes one child test per workbook in every project the data source ingests. Import the pack, run ingestion, materialize, and the template tests cover your own content with no editing. Child tests land in a subfolder named after their template test.
| Template test | Filter | One child per |
|---|---|---|
| Freshness - Every extract refreshed in the last 24 hours | Data Sources: |
published data source |
| Freshness - No data quality warning is active | Data Sources: |
published data source |
| Views - Every view returns data and renders without errors | Workbooks: |
workbook |
| Reconcile - Logical table row counts equal the warehouse | Data Source: Validatar Tableau Fixture / Fixture Sales, excluding (Calculations) |
logical table |
| Integrity - Every data source answers a query | Data Sources: |
published data source |
| Change - Every sheet's fields exist in its data source | Workbooks: |
workbook |
| Change - No sheet has a filter its viewers cannot see | Workbooks: |
workbook |
| Operations - Latest extract refresh did not fail | Data Sources: |
published data source |
The row-count template is the exception that names one data source, because the warehouse side has to hold the same tables and each table costs a VDS query. Change its filter to your data source's schema.
The VizQL Data Service budget
The tests in the two API Access folders and one RLS test query published data sources through VizQL Data Service (VDS). Tableau limits VDS queries per site per hour: the documented allowance is 100 an hour for each Creator license on the site, shared by everything that uses VDS there. On the one-Creator Tableau Cloud site this pack was built on, the allowance was about 28 per clock hour.
| Test | VDS queries |
|---|---|
| Reconcile - Total Sales equals the warehouse | 1 |
| Reconcile - Total Sales by Category equals the warehouse GROUP BY | 1 |
| Reconcile - Distinct customers equal the warehouse COUNT DISTINCT | 1 |
| Reconcile - Logical table row counts equal the warehouse | 1 per logical table (6 on the fixture) |
| Integrity - Orphan keys on the Product relationship | 2 per relationship checked |
| Integrity - Duplicate keys on the Store relationship | 2 per relationship checked |
| Integrity - Calculations that fail in Fixture Sales | 1 on a healthy data source |
| Integrity - Every data source answers a query | up to 3 per data source (14 on the fixture) |
| RLS - The East user's Total Sales equals the warehouse East total | up to 3 |
The template also reads each data source's field list and model through VDS. Those answers are kept on the Data Agent for 15 minutes, so tests on the same data source share them. That is the difference between the per-test figures above and the per-job totals in the jobs table.
On a site with one or two Creator licenses:
- Run the Reconciliation job and the Data source integrity job in different clock hours.
- Narrow Integrity - Every data source answers a query to the data sources that matter before you run it on a large site. Its cost grows with the number of data sources.
- Keep VDS Hourly Budget on the data source below the site's allowance if other tools on the site use VDS too. A test past the budget fails with a plain message before it reaches Tableau, and after Tableau answers 429 the template pauses VDS on that Data Agent for 15 minutes. The VizQL Data Service allowance has the details.
The other four jobs spend no VDS queries and can run at any time.
The tests
The On the fixture column is the outcome on the fixture described below. Several tests fail there on purpose: the fixture carries planted defects so you can see what each check finds.
1 Any site role / Freshness
| Test | Type | What it catches | On the fixture |
|---|---|---|---|
| Freshness - Every extract refreshed in the last 24 hours | Template | An extract last refreshed more than MAX_HOURS ago, or never. Reads the Metadata API. Live connections, and data sources published from a .hyper or other file, have nothing to refresh and pass |
Fixture Refresh Failure fails; Fixture Sales Extract passes while its daily refresh succeeds |
| Freshness - No data quality warning is active | Template | A data quality warning a steward set in Tableau (stale data, deprecated, under maintenance, sensitive data), so it also shows in Validatar | Fixture Budget fails (a STALE warning) |
| Freshness - Total Sales sheet within 10% of recent runs | Standard, drift | A KPI that jumps or collapses between runs: a refresh that loaded the wrong period, or twice | Passes (234,210.00) |
1 Any site role / What viewers see
These read a sheet's summary data, the same data a viewer can download from the sheet, so they need no API Access. Five of them compare with a warehouse data source; see The fixture.
| Test | Type | What it catches | On the fixture |
|---|---|---|---|
| Views - Every view returns data and renders without errors | Template | A sheet or dashboard whose data request fails or returns no rows, a blank image, or Tableau's error wording in the image. A sheet whose fields no longer exist comes back from Tableau Cloud as an empty CSV and a blank image, not an error, so this is where it shows | Fixture Broken Workbook fails (two sheets with missing fields) |
| Views - Total Sales sheet equals the warehouse | Standard, reconciliation | A KPI sheet that shows a different total from the same SUM in SQL | Equal: 234,210.00 |
| Views - Sales by Region sheet equals the warehouse GROUP BY | Standard, reconciliation | A bar chart whose bars differ from the GROUP BY, region by region | Equal for all four regions |
| Views - Sales by Region filtered to West shows only West | Standard, reconciliation | A filter that does not reach the sheet. The filter is applied the way a viewer's filter card applies it, and any other region in the result fails the test | One row, West: 58,970.00 |
| Views - Total Sales sheet for every region equals the warehouse | Standard, reconciliation | A value of a filter card that shows the wrong number. Reads the sheet once per value in VALUES, so one test covers every value |
Equal for all four regions |
| Views - Filtered KPI equals the warehouse (fails on the fixture by design) | Standard, reconciliation | The gap a hidden sheet filter causes: the number looks right and is not | Fails: 180,855.00 against 234,210.00 (North, 53,355.00, is filtered out) |
| Views - Overview dashboard looks the same as recent runs | Standard, drift | A sheet that went blank, moved or changed type, from the share of pixels in eight luminance bands and the mean luminance of a 4 x 4 grid. A move of more than 5 points fails | Passes |
2 API Access / Reconciliation
These query the published data source itself through VDS, so a result holds for every workbook built on it. They need the API Access capability on the data source and a warehouse data source holding the same rows.
| Test | Type | What it catches | On the fixture |
|---|---|---|---|
| Reconcile - Total Sales equals the warehouse | Standard | A measure total that differs from the same SUM in SQL | Equal: 234,210.00 |
| Reconcile - Total Sales by Category equals the warehouse GROUP BY | Standard | A measure grouped by a dimension that differs from the GROUP BY. Tableau keeps rows that find no match across a relationship and shows them under Null, so the warehouse side uses a LEFT JOIN and names the missing category Null too | Equal for all five groups, Null included: 1,145.00 (a product with no category and three sales of a product that does not exist) |
| Reconcile - Distinct customers equal the warehouse COUNT DISTINCT | Standard | A COUNTD measure that differs from COUNT(DISTINCT) | Equal: 12 |
| Reconcile - Logical table row counts equal the warehouse | Template | A logical table with more or fewer rows than its source table | Equal for all six Fixture Sales tables |
2 API Access / Data source integrity
| Test | Type | What it catches | On the fixture |
|---|---|---|---|
| Integrity - Orphan keys on the Product relationship | Standard, detail | Keys on the many side of a relationship with no row on the other side. Tableau keeps those rows and shows them under Null, so nothing errors and totals look complete. RELATIONSHIP names one logical table; blank checks every relationship |
Fails: ProductKey 99 on 3 sales |
| Integrity - Duplicate keys on the Store relationship | Standard, detail | Keys that repeat on the dimension side of a relationship, which multiply the fact rows that join to them | Fails: StoreKey 6 on 2 rows |
| Integrity - Calculations that fail in Fixture Sales | Standard, detail | Calculated fields that error or return only nulls, with Tableau's message. Calculations VDS leaves out of its field list (a field they use is gone, or a formula VDS cannot run, such as RAWSQL) are listed without a query | Fails: Fragile Ratio and Legacy Margin |
| Integrity - Every data source answers a query | Template | A data source that no longer answers, such as a live connection whose database credentials stopped working. Prints Tableau's message | Fixture Dead Connection fails; the rest answer |
3 Download / Change control
| Test | Type | What it catches | On the fixture |
|---|---|---|---|
| Change - Fields of Fixture Sales unchanged since recent runs | Standard, drift | A field removed, renamed or retyped. A new field passes. Reads the definition and the Metadata API, no VDS | Passes |
| Change - Calculations of Fixture Sales unchanged since recent runs | Standard, drift | An edited formula, even when the calculation keeps its name. Each formula is reduced to a checksum; the run log keeps the formulas | Passes |
| Change - Data source filters of Fixture Sales RLS are as approved | Standard, list | A data source filter or extract filter that appears, disappears or changes: rows every sheet on the data source loses | Passes: one data source filter, on Region Entitlement |
| Change - Every sheet's fields exist in its data source | Template | A sheet that uses a field renamed or removed upstream. Tableau Cloud returns no rows and a blank image for it, not an error | Fixture Broken Workbook fails (Legacy Code, Discontinued Measure) |
| Change - No sheet has a filter its viewers cannot see | Template | A sheet filter with no filter card anywhere in the workbook. Data source filters are not counted here, because row-level security is one; set INCLUDE_DATA_SOURCE_FILTERS to count them |
Fixture Hidden Filter fails (Region, all but North) |
| Change - Fixture Sales Workbook is bound to Fixture Sales | Standard, string | A workbook republished against a test copy of its data source | Passes: Fixture Sales |
| Change - Expected views of Fixture Sales Workbook are present | Standard, list (any site role) | A view removed or renamed, and a new view until it is added to the approved list | Passes: nine sheets and three dashboards |
4 Site Administrator / Operations
| Test | Type | What it catches | On the fixture |
|---|---|---|---|
| Operations - Latest extract refresh did not fail | Template | A data source whose most recent refresh job in the last DAYS days failed, with Tableau's message (a missing credential, a database refusing the connection). Data sources with no refresh job pass |
Fixture Refresh Failure fails |
| Operations - Extract refresh schedules are as approved | Standard, list | A refresh task removed, added or moved | Passes: a daily task on Fixture Sales Extract and a weekly one on Fixture Refresh Failure |
| Operations - Last refresh of Fixture Sales Extract took no more than 150% of the recent median | Standard, range | A refresh that suddenly takes much longer, often the first sign of a source that grew or a query that changed | Passes |
5 Connected app / Row-level security
A connected app signs in as any user on the site without that user's password, so these tests see exactly what that user sees. They ship acting as east.user@example.com, a placeholder: set USER to a real user on your site. A personal access token always signs in as its owner, so the two tests that act as a user need the data source in connected app mode.
| Test | Type | What it catches | On the fixture |
|---|---|---|---|
| RLS - User filters of Fixture Sales RLS are as approved | Standard, list (Download) | A user filter calculation removed, changed to other functions, or no longer applied as a data source filter | Passes: Region Entitlement, USERNAME, applied |
| RLS - The East user sees only East on Regional Sales by Region | Standard (connected app) | A user who sees rows for a region other than ALLOWED. A user who sees no rows at all also fails |
Passes: East only |
| RLS - The East user's Total Sales equals the warehouse East total | Standard (connected app and API Access) | A user filter that reaches one sheet but not the measure. Queries the data source as the user and compares with the warehouse filtered to that user's region | Equal: 59,970.00 |
Prerequisites
- A data source built from the Tableau Cloud and Server Data Source Template 3.0, with metadata ingestion run and the Tableau - Catalog Custom Fields imported.
- For the 2 API Access folders and the RLS total: the API Access capability on the published data sources for the signed-in user, on Tableau Cloud or Tableau Server 2025.1 or later.
- For the 3 Download folder and the RLS user filter test: Download Data Source or Download Workbook/Save As on the content.
- For the 4 Site Administrator folder: a Site Administrator sign-in.
- For the two tests that act as a user: the data source in connected app mode, and a real user in
USER. - For the two tests that read images:
pillow,pymupdfandpytesseracton the Data Agent, and the Tesseract binary for the error-text check. - For the reconciliation tests: a warehouse data source holding the same rows.
Import
- In Validatar, open Marketplace from the main navigation.
- Find Tableau Sample Tests and choose Import.
- Pick the target project. Validatar opens that project's import screen with the pack loaded.
- Map the pack's data sources: Tableau Cloud and Server to your Tableau data source, and Warehouse (Snowflake) to the warehouse data source for the reconciliation tests.
- Choose a target folder and commit.
- Materialize the template tests, so their child tests are created from your catalog.
Run the 1 Any site role, 3 Download and 4 Site Administrator jobs twice: the first run seeds the drift tests and the second compares. Run each VDS job once, in its own clock hour on a small site.
To import from a downloaded file instead, take the pack XML from the marketplace listing, open Import in the target project, select the file, map the data sources and commit.
Adjusting a test
Every script opens with a PARAMETERS block, and nothing below it needs editing to retarget the test. Standard tests ship pointing at fixture objects:
# ============================ PARAMETERS ============================
# The project's "Workbooks: <project>" schema in the catalog (or the bare project name).
PROJECT = 'Workbooks: Validatar Tableau Fixture'
# The workbook.
WORKBOOK = 'Fixture Regional Workbook'
# The sheet or dashboard.
VIEW = 'Regional Sales by Region'
# The Tableau user to act as (on Tableau Cloud, the email address).
USER = 'east.user@example.com'
# The only region this user may see.
ALLOWED = 'East'
# ====================================================================
- Point it at your content. Change
PROJECTandDATA_SOURCE, orPROJECT,WORKBOOKandVIEW.PROJECTtakes the catalog schema name or a bare project name or path. - Edit the Control SQL of the reconciliation tests. It ships reading the fixture rows from Snowflake with quoted names (
"Sales","Amount"). Write the same total, GROUP BY or filter against your own warehouse. - Change what it expects. Approved lists (data source filters, views, refresh schedules, user filters) live in the Control script; thresholds such as
MAX_HOURSandDAYSlive in the PARAMETERS block. - Template tests need nothing. Their PARAMETERS are filled in per child test. To narrow one, edit its metadata filter.
- Thresholds that decide pass or fail live on the Control tab: the drift tolerance, the reconciliation tolerance, the range a value must fall in.
The fixture
The pack ships pointing at the Validatar Tableau Fixture project on Tableau Cloud, built from code so its numbers never move. It holds the same synthetic sales rows as the Power BI fixture: 240 order lines, January to March 2026, four regions, Total Sales 234,210.00.
| Item | What it is |
|---|---|
| Fixture Sales | A published data source from a multi-table .hyper file: Sales, Customer, Product, Store, Region and Date, related on their keys, with eight calculated fields. Certified |
| Fixture Sales RLS | The same tables plus RegionManager, and a Region Entitlement user filter applied as a data source filter |
| Fixture Budget | Monthly budget by region, one table, with an active STALE data quality warning |
| Fixture Dead Connection | A live Snowflake connection whose database user does not exist |
| Fixture Sales Extract | An extract of the Snowflake Sales table, published from Tableau Desktop with an embedded key pair and refreshed daily |
| Fixture Refresh Failure | A copy of Fixture Sales Extract republished with no credential, so its weekly refresh fails |
| Fixture Sales Workbook | Nine sheets and the dashboards Overview, Products and Trend, with a Region filter card on Overview |
| Fixture Regional Workbook | Three sheets and a dashboard on Fixture Sales RLS |
| Fixture Broken Workbook | Legacy Product Table and Discontinued KPI use fields the data source does not have; Still Fine works |
| Fixture Hidden Filter | Total Sales (Filtered), a sheet that leaves out North with no filter card |
The planted defects:
- Three sales rows carry ProductKey 99, which has no Product row (orphan keys). Tableau shows them under Null.
- StoreKey 6 appears twice in Store (duplicate key).
- One product has no category.
- Calculation Legacy Margin references a field that does not exist; Fragile Ratio is a RAWSQL calculation VDS refuses.
- Two sheets of Fixture Broken Workbook use fields that do not exist.
- Fixture Hidden Filter leaves out North (53,355.00) with a filter no viewer can see.
- Fixture Dead Connection cannot sign in to its database, and Fixture Refresh Failure has no key to refresh with.
The reconciliation tests' Control side reads the same rows from the Snowflake schema DST_FACTORY_FIXTURES.POWERBI_FIXTURE, in tables and columns named like the data source's fields. Against your own warehouse, edit the Control SQL for your naming.
To use the pack on your own site, keep the template tests as they are, and retarget the standard tests' PARAMETERS blocks at your data sources, workbooks and views.
Troubleshooting
Import reports an unknown data source. Map Tableau Cloud and Server and Warehouse (Snowflake) to your data sources during import.
Template tests have no child tests. Run metadata ingestion on the Tableau data source, then materialize the template tests. A template test's filter matches catalog schema names, so it finds nothing before ingestion.
API Access tests fail with "VizQL Data Service budget reached", or say VDS queries are paused. The data source or the site used its VDS allowance for the hour. Wait for the next clock hour, and run the two API Access jobs in different hours.
API Access tests fail with 401 or 403 from VizQL Data Service. The signed-in user lacks the API Access capability on that data source, or the site runs Tableau Server older than 2025.1.
RLS tests fail saying a connected app is needed. The data source signs in with a personal access token, which always acts as its owner. Switch it to connected app mode.
Image tests error about Pillow, pytesseract or PyMuPDF. Install pillow, pymupdf and pytesseract on the Data Agent, and the Tesseract binary for the error-text check.
Reconciliation tests error with a missing table. The warehouse data source does not hold the fixture rows, or the Control SQL names a schema you do not have. Retarget the Control SQL.
Drift tests pass on the first run no matter what. By design. Their control is the average of the test's previous runs, and Control Missing Result Action is set to Pass so the first run seeds history.