Course outline

Tableau / Advanced: quality and governed delivery / Lesson 17

Prep flows, quality and output contracts

Design a reviewable preparation flow whose cleaning, combination and output steps preserve identity and explain every changed row or amount.

About 4 min readContent reviewed
On this page

Lesson goals

  • Distinguish Prep Builder authoring from scheduled flow operations.
  • Track grain and quality across clean, pivot, join and aggregate steps.
  • Define reproducible output and rejection evidence.

Name the flow contract

Tableau Prep combines, shapes and cleans data through explicit flow steps. Builder authoring and supported web/scheduled execution have different environment, permission and entitlement requirements. A flow diagram is not proof that all source rows have been processed or an output published. Define inputs, key identity, intended grain, quality rules and output consumers before adding steps. The first record is a paper plan with synthetic cafe lines. No Prep application, connector or scheduler is invoked. Treat the preparation output as a data interface used by workbooks, so changing a column or grain requires compatibility review.

text Unexecuted Prep flow plan
input:synthetic order-line facts
clean:approved trailing-space normalization for Product label
quality:validate required key and numeric Sales
combine:verify keys and row/amount reconciliation
output:documented grain, types, lineage and usable-data cutoff

The record defines steps and checks, not a flow file or a completed run.

Clean under identity rules

Whitespace normalization, splitting and grouping can be useful when the source contract justifies them. Do not lowercase every identifier or merge similar-looking names as if they must describe one entity. Product labels and stable product keys can have different rules. Keep the original value or approved lineage sufficient to explain changes, and record rejected rows with a reason. The second program trims only synthetic padding under an explicit label rule and preserves total 60. It is not Prepโ€™s fuzzy grouping, profile sampling or transformation engine. Exact business identity must remain a reviewed decision rather than a cosmetic resemblance.

python Synthetic approved-label cleaning
rows = [("Tea ", 12), ("Coffee", 18), ("Tea", 30)]
cleaned = [(label.strip(), amount) for label, amount in rows]
print(sorted({label for label, _ in cleaned}))
print(sum(amount for _, amount in cleaned))
Expected output
['Coffee', 'Tea']
60

Coffee and Tea remain with total 60. Only whitespace padding is modeled; no real data or Prep engine is used.

Track grain through shape changes

Pivoting wide period columns into rows changes row representation; joining can duplicate or omit facts; aggregation intentionally changes grain. Name each before/after contract and reconcile counts and amounts. A total column beside monthly detail should not become another period fact. Duplicate removal needs a business key and version rule, not equal visible values. Preview/profile data can be sampled, so a clean sample is not full-run quality evidence. Preserve null, malformed type and new-column cases. A flow that produces an output can still be wrong if silent cleaning removed legitimate events or an unexpected join multiplied them.

Define output and ownership

An output contract includes names, types, key uniqueness, grain, accepted/rejected counts, lineage and usable-data cutoff. Decide whether a new run replaces a snapshot or adds new observations; replaying an append can duplicate data if identity handling is absent. Publishing and scheduling flows require supported product features and permissions, with licensing checked for the actual environment. This course neither writes a Tableau output nor schedules a flow. Separate successful Builder preview, complete run, output publication and consumer refresh so each stage has its own owner and verification. A workbook using an older output is not repaired by an unconsumed new flow result.

Review replay and quality evidence

Test valid input, missing key, type error, duplicated input and schema change using tiny synthetic fixtures. Compare full-run coverage with preview assumptions and verify the outputโ€™s actual consumer contract. The course runs only string trimming and integer summation, not Prep, a source or a publication service. A useful handoff explains every removed, normalized or added record and names unexecuted engine checks. Keep transformation intent separate from performance or licensing claims. An attractive flow diagram becomes reliable evidence only when its data scope, results and operational behavior are actually established through the approved process.

Common errors and fixes

Similar labels are merged as one identity without a rule

Why it happens
Cosmetic similarity replaced business-key evidence.
How to fix it
Use approved normalization and preserve original lineage.
Prevent it next time
Review near-match and genuinely distinct cases.

A clean sample is called full-data validation

Why it happens
Preview scope was not distinguished from complete flow processing.
How to fix it
Validate full-run counts and expected quality outcomes separately.
Prevent it next time
Record sampling assumptions with profile evidence.

Replaying an append duplicates a period

Why it happens
Output replacement and event identity were unspecified.
How to fix it
Define idempotent replay or approved version handling.
Prevent it next time
Keep duplicate-input acceptance cases and source lineage.

Check your understanding

1. Why does trimming Tea padding not justify merging every similar product name?

Show worked solution

The example assumes whitespace padding is nonsemantic for a label. Other spelling, case or identifiers can distinguish legitimate entities. Define each normalization rule with the data owner and retain original values or lineage. A successful sum does not establish identity correctness if two different products were collapsed.

2. What should distinguish a replacement snapshot from an append output?

Show worked solution

A replacement represents the approved current snapshot, while append adds observations and needs event/version identity to avoid replay duplication. State the output grain, cutoff and rerun behavior. Verify consumers use the intended version instead of assuming any successful flow updates every workbook immediately.

Key takeaways

  • Prep steps require explicit identity, grain and quality contracts.
  • Preview, full run, output and consumer refresh are different evidence stages.

Official references