Let’s Get Certified
Module 03 / 13 · Manage data

Validate certified data before analysis

Identify the certified source, inspect dependencies and clean invalid values without changing business meaning.

Validate certified data before analysis

Work through the decision

A station-fare extract contains an empty string, the literal “pending,” the number zero and a valid fare. A suggested cleaning query turns every invalid value into zero. How would that affect average fare?

Check your reasoning

TRY_CAST can turn invalid numeric text into null. Preserve a reason flag for missing and invalid values and count each group. AVG ignores nulls but includes zero, so a blanket zero replacement changes both the numerator or denominator interpretation and the metric. Ask the owner whether a pending fare belongs in the population.

Watch the source lesson at 16:08

Compare the choices

Certified dataset discovery
Inspect endorsement, owner, context and freshness in Catalog Explorer. Confirm that the certified asset covers the required grain and time.
Governed tags
Apply a defined tag and allowed values under appropriate tag permissions to classify a governed object consistently.
External lineage
Represent supported dependencies involving assets outside automatically captured platform lineage. Use it to assess downstream impact.
Validated conversion
Use safe parsing and explicit flags, preserve meaningful nulls and review exception rows before aggregation.

Test the decision

Use Catalog Explorer to confirm the approved table, owner and freshness. A governed tag gives a consistent vocabulary for classification. Use lineage to find downstream impact, including registered external relationships where an outside BI tool depends on the column.

Predict how null and zero affect an average

WITH sample(raw_fare) AS (
  VALUES ('5.00'), ('0'), ('pending'), (CAST(NULL AS STRING))
), parsed AS (
  SELECT raw_fare, TRY_CAST(raw_fare AS DECIMAL(8,2)) AS fare FROM sample
)
SELECT COUNT(*) AS rows_seen, COUNT(fare) AS numeric_rows,
       AVG(fare) AS avg_known,
       SUM(CASE WHEN raw_fare IS NOT NULL AND fare IS NULL THEN 1 ELSE 0 END) AS invalid
FROM parsed
Check the result

The query sees four rows, two numeric fares, an average known fare of 2.50 and one invalid text value. If both unknowns were changed to zero, the mean across four rows would become 1.25.

Practice the guide skills

  1. Two similar tables appear in a search. Select the approved source. Watch 16:08 · Continue at 16:26
    Check your answer

    Inspect certification, owner, purpose and freshness in Catalog Explorer. Query the approved qualified name using the appropriate warehouse and privileges.

  2. A dashboard uses a measure from another platform. Record the dependency. Watch 17:40 · Continue at 18:44
    Check your answer

    Apply an authorized governed tag from the controlled vocabulary, inspect recorded lineage and represent the supported external asset and relationship when the dependency is outside automatic capture.

  3. A numeric column includes blanks, invalid text and legitimate zeros. Watch 22:22 · Continue at 23:40
    Check your answer

    Use TRY_CAST with explicit validation and keep an exception count. Preserve null when the value is unknown. Use a default only if the business meaning justifies it.

Official objectives for this lesson

Related lesson · Unity Catalog

Knowledge check

Validate certified data before analysis quiz

Answer 3 questions. Check each answer for an explanation.