Courseiva

Data Masking in Azure Data Factory Mapping Data Flow

An organization is using Azure Data Factory to ingest data from multiple on-premises SQL Server databases into Azure Synapse Analytics. They need to ensure that sensitive data is masked during ingestion before landing in the staging area. What is the best approach?

Quick Answer

The answer is to use a Mapping Data Flow with derived column transformations to mask sensitive columns. This approach is correct because Mapping Data Flows in Azure Data Factory allow you to visually design data transformation logic, including applying masking functions like substring, replace, or custom expressions directly on columns during the ingestion pipeline, ensuring sensitive data is obfuscated before it lands in the staging area. On the DP-203 exam, this question tests your understanding of when to use native data flow transformations versus other Azure services—a common trap is confusing runtime masking (like Azure SQL Dynamic Data Masking, which only hides data at query time) with ETL-time masking, or misapplying governance tools like Purview or compliance policies. Remember the key distinction: if the requirement is to alter data during movement, you need a transformation step in the pipeline, not a post-ingestion feature. Memory tip: “Mask in the flow, not at the show”—meaning apply masking during the data flow, not at query display time.

⚠ Common exam trap

DP-203 often tests the confusion between classification (Purview), policy enforcement (Azure Policy), and source-side masking (dynamic data masking) versus actual in-pipeline transformation — only a data flow transformation masks data before it lands.

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

✓

Use a Mapping Data Flow with derived column transformations to mask sensitive columns.

A Mapping Data Flow in Azure Data Factory can apply derived column transformations to mask sensitive fields (for example, using SHA2 hashing, substring, or fixed replacement) as data flows from source to sink. Because the masking occurs in the pipeline before data lands in the staging area, this satisfies the requirement to mask during ingestion.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Apply an Azure Policy that masks sensitive data in Azure Synapse Analytics.

    Why it's wrong here

    Azure Policy evaluates and enforces resource configuration, not row-level data content, so it cannot mask values during ingestion. It suits controlling deployment settings such as allowed SKUs or required diagnostics; masking belongs in the Data Factory copy activity mapping before staging.

  • ✗

    Use Azure SQL Database dynamic data masking on the source databases.

    Why it's wrong here

    Dynamic data masking applies at query time on Azure SQL Database, and the sources are on-premises SQL Server, so it neither covers them nor alters data written by Data Factory. It suits concealing columns from under-privileged query users, not masking during ingestion.

  • ✓

    Use a Mapping Data Flow with derived column transformations to mask sensitive columns.

    Why this is correct

    Mapping Data Flows run on Spark and support derived column transformations, letting you apply masking expressions such as hashing or partial replacement to sensitive columns as data flows through the pipeline. Masking occurs before landing in staging, satisfying the pre-ingestion masking requirement.

  • ✗

    Use Azure Purview to classify and mask sensitive data automatically.

    Why it's wrong here

    Purview classifies and labels data across sources, but it does not transform or mask records in flight; masking must occur in the Data Factory copy activity mapping before the staging sink is written. Purview suits governance, catalogue and sensitivity labelling rather than ingestion-time transformation.

About these practice questions

One of 509 original DP-203 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DP-203

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You are designing a data pipeline that uses Azure Data Factory to copy data from an Azure SQL database to Azure Data Lake Storage Gen2. The data contains personally identifiable information (PII) that must be masked. Which Data Factory feature should you use?

easy
  • A.Use a copy activity with a query to select only non-PII columns.
  • B.Use a stored procedure activity to mask data in the source before copy.
  • C.Enable staging on the copy activity to use PolyBase.
  • ✓ D.Use a mapping data flow to apply a mask transformation on PII columns.

Why D: Mapping Data Flows in Azure Data Factory provide built-in transformations for data masking, such as the Mask transformation, which can obfuscate PII columns during the data flow. Option A is incorrect because a copy activity with a query can only filter columns but does not support masking; it simply selects a subset of columns without transformation. Option B is incorrect because while a stored procedure activity can execute masking logic on the source, it requires additional setup and does not integrate seamlessly with Data Factory's native transformation capabilities. Option C is incorrect because staging with PolyBase is used to improve bulk copy performance, not for data masking.

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.