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.

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.

Mapping Data Flow in Azure Data Factory allows you to transform data during ingestion. Using derived column transformations, you can apply masking functions (e.g., substituting characters, hashing) to sensitive columns before writing to the staging area. This approach masks data before it reaches the staging area, meeting the requirement. Option A (Azure Policy) is for compliance and cannot mask data. Option B (Dynamic Data Masking on source) masks data at query time, not during ingestion. Option D (Azure Purview) is for data governance and classification, not for masking data during a pipeline.

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 enforces compliance rules, not data masking during ingestion.

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

    Why it's wrong here

    Dynamic data masking is applied at query time; it does not mask data during extraction.

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

    Why this is correct

    Mapping Data Flow allows you to apply transformations like mask using derived columns before writing to staging.

  • Use Azure Purview to classify and mask sensitive data automatically.

    Why it's wrong here

    Azure Purview does not mask data during ingestion; it classifies and manages metadata.

Go deeper

Related to this question

About these practice questions

One of 760 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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.