Step 4: Validate Data
Prerequisite: You should have multiple tags flowing from Step 3. If not, complete that first!
The Problem
Right now, ALL your data goes into _raw - no validation:
DB1.DW20 could suddenly send "hello" instead of a number
Critical vibration data might arrive with wrong units
Typos in tag names create duplicate data streams
How do you ensure data quality? Data Models!
Part 1: Create Your First Data Model
Let's create a model for a CNC machine's vibration data.
Add a Data Model
Go to Data Models → Add Data Model
Instance: Select your instance
Name:
cncDescription: "CNC machine vibration monitoring"
Define the Structure
In the Data Model Structure section, add this YAML:
What this means:
Your CNC model has a
vibrationfolderInside are two measurements:
x-axisandy-axisBoth must be numbers (enforced automatically!)

Click Save & Deploy.

💡 Behind the scenes: The system automatically creates a data contract called _cnc_v1. This contract will enforce your model's structure. Learn more about data contracts →
Part 2: Use Your Model in a Bridge
Find Your Contract Name
Go to Contracts tab
Find
_cnc_v1- this was auto-generated from your modelNote the structure it expects

Update Your Bridge
Go back to your S7 bridge from Step 3. In the Always section, change:
To:

Click Save & Deploy.
Part 3: Experience Validation (It Will Fail!)

Your deployment fails! Look at the error:
Data models ENFORCE structure. Your S7 address DB1.DW20 doesn't match the expected paths vibration.x-axis or vibration.y-axis.
Two new concepts here:
Deployments can fail not only if the connection is bad (learned in Step 2)
But also if the bridge throws validation errors
Part 4: Fix with Smart Routing
Instead of forcing ALL data into the model, let's be selective. Change your Always section back:
Now update your condition for DB1.DW20:

What this does:
DB1.DW20 → Validated as
vibration.x-axisin CNC modelAll other tags → Continue to
_raw(no validation)
Click Save & Deploy. Now it succeeds!
Part 5: Success! View Your Validated Data

In Topic Browser, you now see:
How validation works:
The CNC model guarantees
x-axisis always a numberIf someone sends text, it's rejected at the bridge
Other data flows normally through
_raw
Concepts Learned
Building on previous guides, you now understand:
Data Models - Reusable templates defining data structure
Payload Shapes - Type validation (timeseries-number, etc.)
Schema Validation - Automatic enforcement at the bridge
Auto-generated Contracts - Models create contracts like
_cnc_v1Validation Errors - Deployments fail if data doesn't match
Selective Validation - Route specific data to validated models
What's Next?
You now have a complete data pipeline with:
✅ Automatic tag discovery (Step 3)
✅ Smart organization (Step 3)
✅ Data validation (Step 4)
Ready for production? Check out:
Production Guide - Sizing, security, monitoring
Data Modeling Deep Dive - Advanced models
Stream Processors - One way to transform device data to business KPIs
Congratulations! You've mastered the fundamentals of UMH Core. Your data is now organized, validated, and production-ready. 🎉
Last updated

