Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Using Conditional Split and Filtering in ADF | Data Flows and Transformations in ADF
Introduction to Data Engineering with Azure
course content

Course Content

Introduction to Data Engineering with Azure

Introduction to Data Engineering with Azure

1. Getting Started with Azure and Core Tools
2. Foundations of Azure Data Factory
3. Data Flows and Transformations in ADF
4. Practical Problem Solving with ADF

bookUsing Conditional Split and Filtering in ADF

This chapter explores how to use Conditional Split and Filter Transformations in Azure Data Factory (ADF) Data Flows to organize and refine data for downstream processes. You'll learn how to divide data based on conditions and filter out unwanted records efficiently.

In Azure Data Factory, a Conditional Split transformation can be used to route records based on conditions, such as splitting data into "High" and "Low" categories based on a sales amount. For example, if the sales amount is greater than 1000, the record is sent to the "High Sales" output, otherwise, it's sent to the "Low Sales" output for further processing.

For example, if you want to filter out records with null or invalid email addresses, you can apply a filter that removes records where the email is either null or does not match a valid email format.

How to Use Conditional Split and Filter Transformations in ADF

  1. Create a new Data Flow or use an existing one in the Author section of Azure Data Factory Studio;
  2. Drag a Source Transformation onto the Data Flow canvas and configure it to ingest data, such as from SQL tables or Blob Storage;
  3. Add a Conditional Split Transformation from the toolbox and connect it to your data source;
  4. In the Conditional Split settings, define conditions to split the data into multiple streams. In our case, we used the following:
    • LowRisk: DeathRate < 5;
    • HighRisk: DeathRate > 10;
    • MediumRisk: DeathRate >= 5 and <= 10;
  5. Add a Filter Transformation and connect it to the data stream that you want to filter;
  6. In the Filter settings, define the filter condition to keep only necessary records. In our case we remained only records where the WeekEndingDate is after/ before '2021-09-01';
  7. Connect each output stream to separate Sink Transformations to store the split data in different destinations (e.g., one for low risk, one for high risk, and one for medium risk);
  8. Validate the Data Flow configuration to ensure everything works correctly.
What is the purpose of connecting multiple Sink transformations after using Conditional Split and Filter in ADF?

What is the purpose of connecting multiple Sink transformations after using Conditional Split and Filter in ADF?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 4
We're sorry to hear that something went wrong. What happened?
some-alt