Skip to content

Commit e686ce3

Browse files
Merge pull request #314843 from jlian/fix/dfg-filter-schema-validation-docs
Fix schema validation docs: correct schemaRef location and add tabs
2 parents 893669e + bccc089 commit e686ce3

1 file changed

Lines changed: 74 additions & 2 deletions

File tree

articles/iot-operations/connect-to-cloud/howto-dataflow-graphs-filter-route.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: sethm
66
ms.service: azure-iot-operations
77
ms.subservice: azure-data-flows
88
ms.topic: how-to
9-
ms.date: 04/02/2026
9+
ms.date: 04/16/2026
1010
ai-usage: ai-assisted
1111

1212
---
@@ -182,13 +182,85 @@ For the full list of operators and functions, see [Expressions reference](concep
182182

183183
You can configure a filter transform to validate incoming messages against a JSON schema before filter rules run. Messages that don't conform to the schema are dropped immediately.
184184

185-
To enable schema validation, set `validateSchema` to `true` in the filter configuration. When enabled, the filter retrieves the schema from the dataflow source's `schemaRef` setting.
185+
To enable schema validation, set `validateSchema` to `true` in the filter configuration. When enabled, the filter retrieves the schema from the `schemaRef` on the incoming node connection (the `from` side of the `nodeConnections` entry that feeds into the filter node).
186+
187+
# [Operations experience](#tab/portal)
188+
189+
The filter transform configuration includes a **Validate schema** checkbox. However, the Operations experience doesn't currently support configuring or viewing the `schemaRef` on node connections. To use schema validation, configure the node connection's `schemaRef` through Bicep or Kubernetes manifests.
190+
191+
# [Bicep](#tab/bicep)
192+
193+
Include `validateSchema` in the filter rules JSON and configure `schemaRef` on the incoming node connection:
194+
195+
```bicep
196+
nodes: [
197+
{
198+
nodeType: 'Graph'
199+
name: 'schema-filter'
200+
graphSettings: {
201+
registryEndpointRef: 'default'
202+
artifact: 'azureiotoperations/graph-dataflow-filter:1.0.0'
203+
configuration: [
204+
{
205+
key: 'rules'
206+
value: '{"version":"1.0.0","validateSchema":true,"filter":[]}'
207+
}
208+
]
209+
}
210+
}
211+
]
212+
nodeConnections: [
213+
{
214+
from: {
215+
name: 'sensors'
216+
schema: {
217+
schemaRef: 'aio-sr://my-namespace/sensor-schema:1'
218+
serializationFormat: 'Json'
219+
}
220+
}
221+
to: { name: 'schema-filter' }
222+
}
223+
]
224+
```
225+
226+
# [Kubernetes (debug only)](#tab/kubernetes)
227+
228+
[!INCLUDE [kubernetes-debug-only-note](../includes/kubernetes-debug-only-note.md)]
229+
230+
```yaml
231+
nodes:
232+
- nodeType: Graph
233+
name: schema-filter
234+
graphSettings:
235+
registryEndpointRef: default
236+
artifact: azureiotoperations/graph-dataflow-filter:1.0.0
237+
configuration:
238+
- key: rules
239+
value: |
240+
{
241+
"version": "1.0.0",
242+
"validateSchema": true,
243+
"filter": []
244+
}
245+
246+
nodeConnections:
247+
- from:
248+
name: sensors
249+
schema:
250+
schemaRef: "aio-sr://my-namespace/sensor-schema:1"
251+
serializationFormat: Json
252+
to:
253+
name: schema-filter
254+
```
255+
256+
---
186257

187258
Guidelines:
188259

189260
- Use only one validating filter per pipeline.
190261
- Place the validating filter first so that invalid messages are dropped before other processing.
191262
- Filter rules still apply after schema validation passes. If you only need schema validation, leave the filter rules empty.
263+
- The `schemaRef` must point to a schema in the schema registry. The `serializationFormat` specifies the schema format (for example, `Json`).
192264

193265
To learn about configuring schemas, see [Understand message schemas](concept-schema-registry.md).
194266

0 commit comments

Comments
 (0)