DP-203 Develop data processing Practice Question
You are building an Azure Stream Analytics job that reads JSON events from an Azure Event Hub and writes aggregated results to an Azure Synapse Analytics dedicated SQL pool. The events include a field named `EventTime` that is sometimes missing or malformed. You need the job to process only events with a valid `EventTime` and route invalid events to a separate output for later inspection. What should you do?
⚠ Common exam trap
The trap here is assuming that the Event Hub input or serialization settings can automatically drop or reroute malformed events, when routing must be implemented in the query with multiple outputs.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
In the Stream Analytics query, use a WITH clause to define a filtered stream that selects events where TRY_CAST(EventTime AS datetime) IS NOT NULL, and write the excluded events to a separate output using a second query.
Stream Analytics queries can filter and split streams using standard SQL expressions. TRY_CAST safely converts values and returns NULL for malformed input, allowing a filtered stream of valid events. A second query selecting the complement routes invalid events to a separate output. This approach keeps the job running without failures and provides a mechanism to inspect bad data later.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure the Event Hub input to use the JSON serialization format with the `EventTime` field marked as required, so the job automatically drops events missing that field.
Why it's wrong here
Stream Analytics JSON serialization does not support marking individual fields as required. The input deserializer will parse the JSON and pass all fields through; missing fields simply appear as NULL. There is no built-in mechanism at the input layer to drop or reroute events based on a specific field's presence or validity.
- ✗
Use a JavaScript user-defined function in the query to validate `EventTime` and throw an exception for invalid events, which Stream Analytics will automatically redirect to the job's error log.
Why it's wrong here
While JavaScript UDFs can be used in Stream Analytics, throwing an exception does not route the event to a separate output. Errors are logged for diagnostics, but the event is not delivered to another output destination. To separate valid and invalid events into different sinks, you must express that logic in the query using multiple outputs.
- ✗
Add a second output to the job that writes to Azure Blob Storage, and configure the Event Hub input to send malformed events to that output.
Why it's wrong here
Event Hub inputs do not support conditional routing of malformed events to a secondary output. The input simply delivers events to the query; any filtering or routing must be expressed in the query itself or handled after ingestion. Configuring the input this way is not a supported Stream Analytics capability, so invalid events would still reach the main output.
- ✓
In the Stream Analytics query, use a WITH clause to define a filtered stream that selects events where TRY_CAST(EventTime AS datetime) IS NOT NULL, and write the excluded events to a separate output using a second query.
Why this is correct
Stream Analytics supports T-SQL-like expressions, including TRY_CAST, which returns NULL instead of failing on malformed input. By defining a filtered stream with a WITH clause and writing two queries—one for valid events and one for the complement—you can route valid events to Synapse and invalid events to a separate output. This is the supported pattern for conditional routing.
Go deeper
Related to this question
Learn chapter
Implement Azure Synapse Analytics
Key term
Azure Synapse Analytics
Azure Synapse Analytics is a cloud-based data integration, warehousing, and analytics service that brings together big data and data warehouse capabilities under one platform.
Key term
Azure Stream Analytics
Azure Stream Analytics is a fully managed, real-time data processing service that analyzes and transforms high volumes of streaming data from various sources to deliver low-latency insights and trigger actions.
About these practice questions
Courseiva writes every DP-203 question from scratch — 509 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
This DP-203 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-203 exam.