Azure Data Factory

Azure Data Factory

A complete, plain-English guide to the cloud service that moves, cleans, and organizes data on a schedule: how it is built, how a pipeline really runs, how to keep it secure and reliable, and how to run it well in production.

Picture a large factory that makes breakfast cereal. Grain arrives by truck from many farms. Each farm packs its grain differently. Some deliver in sacks, some in bulk, some in crates that are hard to open. Inside the factory, conveyor belts carry the grain to cleaning machines, then to cooking machines, then to the packing line, and finally to a loading dock where the boxes leave for supermarkets. A control room watches every belt, starts each machine at the right time, and sounds an alarm if something jams. Nobody in the supermarket ever sees the factory, yet every cereal box on the shelf depends on it.

Companies have exactly the same problem with data. Information arrives from many places: sales systems, websites, sensors, spreadsheets, partner files. It comes in different shapes and has to be collected, cleaned, joined together, and delivered to the places where people build reports and make decisions. Azure Data Factory, often shortened to ADF, is Microsoft’s cloud service for building those conveyor belts and the control room that runs them. In this guide you will learn what it is, why it exists, every part inside it, and the mistakes that trip up even experienced engineers. Each new word is explained the first time it appears, so you can begin with no background at all.

1What Azure Data Factory Is

Start with the big picture: what it does, what it does not do, and where it lives.

Azure Data Factory is a fully managed, serverless data integration service. Let us unpack those words. Data integration means bringing data from many different places together so it can be used as one. Managed means Microsoft runs the machines, applies the updates, and keeps the service available, so you do not look after servers. Serverless means you do not choose or rent machines in advance. You describe the work, and Azure finds the computing power when the work runs and releases it afterward, charging you only for what was used.

What does it actually do? Two main things. First, it moves data: it copies information from a source, such as a database in your office, a file in Amazon storage, or a software service like Salesforce, to a destination, such as Azure storage or a cloud database. Second, it orchestrates work, which means it decides what happens in what order and at what time. It can start a data copy at two in the morning, wait for it to finish, then ask another service to clean the data, then send an email if anything fails. The word orchestration comes from music: a conductor does not play any instrument, but tells each player when to start and stop.

ADF is often described as an ETL and ELT tool. ETL stands for extract, transform, load: pull the data out, reshape it, then put it into its destination. ELT swaps the last two steps: pull the data out, load it first into a powerful destination such as a data lake or warehouse, and let that destination do the reshaping. Modern cloud designs lean toward ELT because cloud destinations are very powerful, and ADF supports both styles.

Analogy

If your data systems are the machines in a cereal factory, ADF is the network of conveyor belts and the control room. It rarely makes the cereal itself. Its main job is to carry the right ingredients to the right machine at the right time, in the right order, and to tell you quickly when something jams.

90+
Ready-made connectors to data sources and destinations
Serverless
No machines to rent, patch, or size in advance
Pay per use
Billed by what each run actually uses

A short history

Before the cloud, companies moved data with tools such as SQL Server Integration Services, a program that ran on their own servers. When businesses began storing data in the cloud, they needed a cloud-native way to move it that did not depend on a particular server. Microsoft released the first Azure Data Factory in 2015. The current generation, called version 2, arrived in 2018 with a far richer design, including schedules, event triggers, visual data transformation, and the ability to run old SSIS packages in the cloud. The first version has since been retired, so everything today means version 2. Microsoft has also built a related Data Factory experience into Microsoft Fabric, its newer all-in-one analytics platform. Azure Data Factory remains a standalone Azure service, and Microsoft’s current guidance can help you decide which one suits a new project.

i
Tip

Prices, limits, and connector lists change over time. Use the ideas in this guide as a map and confirm exact numbers in Microsoft’s current documentation before you finalize a design.

2The Problem It Solves

Every tool exists because something hurt. Here is the pain that ADF removes.

Imagine a clothing retailer. Sales happen in a point-of-sale system in each shop, orders arrive from a website, stock levels live in a warehouse system, and customer emails sit in a marketing tool. The head of the company asks a simple question: “Which products are selling fastest in which cities, and are we about to run out?” To answer it, someone must gather data from all of those places, line it up, remove errors, and put it somewhere reports can read it. Done by hand, with spreadsheets, this takes days and goes wrong often.

Companies tried to automate it by writing their own scripts, small programs that copy data on a schedule. This works until it does not. A script fails silently at night and nobody notices until the morning report is empty. One person writes it, leaves the company, and nobody understands it. A change in a source system breaks everything. Scripts rarely handle retries, logging, alerts, or scaling, and each one is built differently.

Pain 1

Data scattered everywhere

Information lives in dozens of systems with different formats, rules, and access methods.

Pain 2

Hand-made scripts break quietly

Home-grown copy jobs lack retries, alerts, history, and clear ownership.

Pain 3

Hard to scale

A job that copies a thousand rows today may need to copy a billion tomorrow.

Pain 4

Old and new worlds must meet

Data in office servers must flow to the cloud without exposing those servers to the internet.

ADF replaces the pile of scripts with a single, visual, monitored system. You draw the flow of work as a diagram, point it at your data sources, set the schedule, and let Azure run it. Retries, logging, alerts, history, and scaling are built in, so the whole team can see what ran, when, and what went wrong.

Everyday example: the morning sales report

Every night at one o’clock, a retailer’s ADF pipeline copies the day’s sales from fifty shop databases into a central data lake, joins them with product details, and refreshes a summary table. By seven in the morning, managers open a dashboard that already shows yesterday’s numbers. If a shop’s database is offline, ADF retries three times, then sends a message to the support team, and the dashboard shows which shop is missing.

3Core Concepts: The ADF Vocabulary

ADF has a small set of building blocks. Learn these eight words and every diagram becomes easy to read.

The central object is the data factory itself. It is the Azure resource that holds everything else, like the building that houses the factory floor. Inside it you create the following pieces.

TermPlain meaningFactory comparison
PipelineA group of steps that together do one jobOne complete production line
ActivityOne step inside a pipelineOne machine on the line
Linked serviceA saved connection to a data store or compute serviceThe delivery address and the key to the loading door
DatasetA named view of the data inside a linked serviceA label for one specific crate
Integration runtimeThe computing engine that actually does the workThe electricity and workers that run the machines
TriggerThe thing that starts a pipelineThe shift bell or the sensor that detects a delivery
Data flowA visual, code-free way to transform dataA cleaning and cooking machine
ParameterA value passed in so one design can be reusedA setting dial on the machine

Two more words appear everywhere. A pipeline run is one execution of a pipeline, like one shift on the production line. A source is where data comes from and a sink is where it goes. The sink name comes from the idea of a kitchen sink where things flow down and end up.

Analogy

Think of making a school lunch box for a hundred children every morning. The recipe is the pipeline. Each instruction, such as “slice the bread,” is an activity. The address book of suppliers is the set of linked services. The kitchen staff and equipment are the integration runtime. The alarm clock that wakes the kitchen at six is the trigger.

i
Tip

Hold on to the split between design and execution. Pipelines, datasets, and linked services are just descriptions. Nothing moves until a trigger starts a run and an integration runtime does the work.

4Architecture and Components

Now let us see how all the pieces connect, from the data sources on the left to the destinations on the right.

ADF is built in two layers. The control plane is the management side. It stores your pipeline designs, runs the scheduler, tracks every run, and decides what should happen next. It is entirely managed by Azure. The data plane is the working side. It is the integration runtime, the engine that really connects to the sources, moves the bytes, and runs the transformations. Keeping the two apart means the brain of the system stays small and reliable, while the muscle can be placed near your data and scaled independently.

You build your designs in Azure Data Factory Studio, a web-based drawing board. It has several areas called hubs. The Author hub is where you create pipelines, datasets, and data flows. The Monitor hub shows what ran and what failed. The Manage hub holds connections, integration runtimes, triggers, source control settings, and security options.

flowchart LR
    SRC1["On-premises database"] --> IR["Integration runtime - data plane"]
    SRC2["Software service"] --> IR
    SRC3["Cloud files and storage"] --> IR
    CP["Data Factory - control plane"] -->|"starts and tracks runs"| IR
    IR --> SINK1["Data lake storage"]
    IR --> SINK2["Cloud data warehouse"]
    IR --> SINK3["Analytics and reports"]
    
Figure 1. The control plane directs the work and the integration runtime carries the data.

Read the diagram from left to right. Data sits in many sources. When a run begins, the control plane tells the integration runtime what to do. The runtime reads from the sources, optionally reshapes the data, and writes it to one or more sinks. The control plane never touches your actual data. It only sends instructions and collects status reports, which is a useful fact for security teams.

Brain

Control plane

Stores designs, schedules runs, tracks status, and sends instructions.

Muscle

Data plane

The integration runtime that connects to data and moves it.

Drawing board

Data Factory Studio

The web tool with Author, Monitor, and Manage hubs.

Storage of designs

Factory resource and Git

Your designs live in the factory and can be saved to a Git repository.

Connections

Linked services

Saved addresses and credentials for every system you use.

Destinations

Sinks

Lakes, warehouses, databases, and files where results land.

5Linked Services and Datasets

Before any data can move, ADF must know where it lives and how to get in. That is the job of these two objects.

A linked service is a saved connection. It holds the address of a system and the way to prove who you are, such as a name and password, a key, or a managed identity. Linked services come in two kinds. The first kind connects to data stores, such as databases, file storage, and software services. The second kind connects to compute services, such as a big data cluster that ADF asks to do heavy work. A linked service is like a contact in your phone: it saves the number so you do not retype it every time.

A dataset sits one level down. It points to the exact data inside a linked service. If the linked service is a connection to a database server, the dataset names one table. If the linked service is a connection to file storage, the dataset names one folder or one file and says whether it is a spreadsheet-style text file, a compact column format such as Parquet, or a nested format such as JSON. Datasets describe the shape of the data and where it sits, and activities use them as inputs and outputs.

The big benefit is reuse. You set up the connection once, and every pipeline that needs that system uses the same linked service. When a password changes or a server moves, you fix it in one place. Modern ADF also allows parameterized linked services and datasets, which means the server name or file path is filled in at run time. One generic dataset can then serve a hundred different tables.

Analogy

A linked service is the address of a warehouse together with the key to its door. A dataset is a note that says “aisle seven, shelf three, the blue boxes.” You need both to fetch the right box, and you can reuse the same warehouse address for every note.

!
Warning

Never type passwords directly into linked services. Store secrets in Azure Key Vault, a locked cabinet for secrets, and let the linked service read them from there, or use a managed identity so that no password exists at all.

Everyday example: one connection, many tables

A company has one SQL Server holding two hundred tables. Instead of building two hundred datasets, the team builds a single parameterized dataset that takes the table name as an input. A list of table names drives a loop that copies each table with the same design.

6Pipelines and Activities

The pipeline is the heart of ADF. Learn the kinds of steps it can hold and how steps depend on each other.

A pipeline is a logical group of activities that together perform one task, such as “load yesterday’s sales.” Activities are the steps. They fall into three families.

Family 1

Data movement

The Copy activity reads from a source and writes to a sink. It is the most used activity in ADF.

Family 2

Data transformation

Mapping data flows, plus activities that call other engines such as Databricks, Synapse, SQL stored procedures, and Azure Functions.

Family 3

Control flow

Activities that steer the pipeline: loops, conditions, waits, calls to other pipelines, and web calls.

Control flow in plain words

Control flow is what makes a pipeline smart rather than a simple list. ForEach repeats a set of steps for every item in a list, and it can run many items in parallel, up to about fifty at once. If Condition chooses between two branches, like a fork in the road. Switch chooses among several branches. Until repeats until something becomes true, such as waiting for a file to appear. Wait pauses. Lookup reads a small amount of data, often a list of tables or a last-loaded date, and hands it to later steps. Get Metadata inspects a file or folder, for example to see whether it exists or how big it is. Execute Pipeline calls another pipeline, letting you build small reusable blocks. Web calls an external web address, which is handy for sending a message to a chat tool or starting some other service.

Dependencies between activities

Activities are joined by arrows called dependencies. An arrow can be set to follow one of four outcomes: on success, on failure, on completion (whether it worked or not), or on skip. This lets you draw error handling right into the design. For instance, if the copy step succeeds, run the clean-up step; if it fails, send an alert. Because the arrows decide order, activities without arrows between them run at the same time, which is the easy way to get parallel work.

1

Lookup the list

A first step reads which tables or files are due to be processed.

2

ForEach item

A loop starts one copy per table, running several at once.

3

Transform

On success, a data flow or a call to another engine cleans the data.

4

Record the result

A stored procedure writes the row counts and time into an audit table.

5

Alert on failure

If anything failed, a web call sends a message to the support team.

!
Warning

A single pipeline has a ceiling on how many activities it may contain. Rather than building one giant pipeline, split work into small, focused child pipelines and call them from a parent. They are easier to read, test, reuse, and debug.

7Integration Runtimes

The integration runtime decides where your work runs and which networks it can reach. Choosing the right one is one of the most important design decisions in ADF.

An integration runtime, shortened to IR, is the computing infrastructure that ADF uses to do real work: copy data, run data flows, dispatch jobs to other services, and run packages. There are three kinds.

Azure integration runtime

The Azure IR is the default. It is fully managed and serverless, runs in Azure, and can reach any data store that has a public address on the internet or inside Azure. You do not install anything. It scales by itself, and you can choose the Azure region where it runs. A variation, the Azure IR in a managed virtual network, runs inside a private network that Microsoft creates for your factory. In that mode ADF connects to your data stores using managed private endpoints, which are private doors approved by the data store owner, so data never crosses the public internet.

Self-hosted integration runtime

Some data sits where Azure cannot reach directly, such as a database in your office behind a firewall. For this you install the self-hosted IR, a small program, on a machine inside your own network. It makes only outbound connections to Azure, over the standard secure web port, so you do not need to open any inbound holes in your firewall. The self-hosted IR can also run on several machines together, called nodes, for high availability and more throughput, and it can be shared among several factories.

Azure-SSIS integration runtime

Many companies already own hundreds of packages built with SSIS, SQL Server Integration Services, Microsoft’s older on-premises data tool. The Azure-SSIS IR is a managed group of virtual machines dedicated to running those packages in the cloud without rewriting them, a strategy called lift and shift.

flowchart TB
    ADF["Data Factory control plane"] --> AZIR["Azure IR - managed and serverless"]
    ADF --> SHIR["Self-hosted IR - on your machines"]
    ADF --> SSIS["Azure-SSIS IR - managed virtual machines"]
    AZIR --> CLOUD["Cloud data stores"]
    AZIR --> PE["Private data stores via managed private endpoints"]
    SHIR --> ONP["On-premises and private network data"]
    SSIS --> PKG["Existing SSIS packages"]
    
Figure 2. Three kinds of integration runtime, each suited to a different location of data.
RuntimeWhere it runsBest forYou manage
Azure IRAzure, serverlessCloud and internet-reachable dataAlmost nothing
Azure IR in managed virtual networkAzure, in a private managed networkCloud data that must stay privatePrivate endpoint approvals
Self-hosted IRYour own machinesOn-premises or private network dataThe machines, updates, and nodes
Azure-SSIS IRManaged virtual machines in AzureRunning existing SSIS packagesSize, start, and stop
Analogy

The Azure IR is a courier company that can pick up from any public address. The self-hosted IR is your own trusted employee sitting inside the office building, who carries parcels out through the front door so that no courier ever has to enter. The SSIS IR is a rented workshop that already contains your old machines, working exactly as before.

i
Tip

Put the integration runtime physically close to the data it moves. A runtime in the same region as the source and sink avoids slow trips across oceans and avoids extra data transfer charges.

8Triggers: What Starts a Pipeline

A pipeline is only a design until something starts it. Triggers are the starters.

A trigger decides when a pipeline runs. You can also start a pipeline by hand, which is useful for testing, but production work is almost always started by a trigger. ADF offers four main kinds.

Time

Schedule trigger

Starts a pipeline at set times, such as every night at one, or every Monday morning. The simplest and most common.

Time slices

Tumbling window trigger

Cuts time into fixed, back-to-back, non-overlapping windows and runs the pipeline once for each. Supports retries, dependencies, and catching up on missed windows.

Event

Storage event trigger

Starts when a file is created or deleted in storage, so a pipeline can react the moment a partner uploads data.

Event

Custom event trigger

Starts when a message arrives on an event routing service, for flexible, application-driven designs.

The tumbling window deserves a closer look because it solves a real puzzle. Suppose a pipeline must process each hour’s data exactly once. With an ordinary schedule, if the system is down at three o’clock, the three o’clock slice may simply be missed. A tumbling window remembers each slice as a separate unit with its own start and end time. If a slice fails, it can retry just that slice. If the factory was off for a day, it can run all the missed slices to catch up, a task called backfill. It also lets one window wait for another to finish first.

flowchart LR
    T1["Schedule trigger - time based"] --> P["Pipeline run"]
    T2["Tumbling window - one run per time slice"] --> P
    T3["Storage event - file arrives"] --> P
    T4["Custom event - message arrives"] --> P
    T5["Manual start - testing"] --> P
    
Figure 3. Many kinds of trigger can start the same pipeline.
Analogy

A schedule trigger is a regular alarm clock that rings every morning whether or not you are ready. A tumbling window is a school timetable: every period has its own slot, a missed class can be made up later, and the next class may wait for the last one to finish. An event trigger is the doorbell that rings only when a delivery actually arrives.

!
Warning

Triggers must be started before they take effect, and a trigger that is published but not started does nothing. After every deployment, confirm that the triggers you expect are running.

Everyday example: partner files

A logistics company receives delivery files from partners at unpredictable times during the day. Instead of checking every ten minutes, a storage event trigger starts a pipeline within moments of each upload. The file is validated, loaded, and a confirmation message is sent back to the partner automatically.

9Internal Working: How a Copy Run Really Happens

What actually happens, step by step, when a Copy activity moves a table from a database into a data lake? Let us follow one run.

It starts with the trigger. When a trigger fires, the control plane creates a pipeline run, gives it a unique identifier, and records its start time. The scheduler works out which activities can start first, which are those without waiting arrows, and queues them. For a Copy activity, the control plane hands a job to the chosen integration runtime, together with the connection details from the linked services and the descriptions from the datasets.

The integration runtime now does the real work. It opens a connection to the source using the stored credentials. It asks the source for the data, often splitting the request into several parallel slices so many parts of a large table can be read at once. For example, it may divide a table by ranges of a number column. Data flows through the runtime in memory in small batches, so even a very large table never needs to fit in memory all at once. The runtime converts values from the source’s types into the destination’s types, writes the data to the sink in efficient bulk operations, and reports progress back to the control plane every so often.

When all slices finish, the Copy activity reports the number of rows read, rows written, the speed, and any skipped rows. The control plane records the result, checks which arrows leave this activity, and starts the next activities whose conditions are now satisfied. When the last activity ends, the pipeline run is marked succeeded or failed, and the run is stored so you can inspect it later.

sequenceDiagram
    participant Trig as Trigger
    participant CP as Control plane
    participant IR as Integration runtime
    participant Src as Source database
    participant Snk as Data lake sink
    Trig->>CP: Fire and create pipeline run
    CP->>IR: Send copy job with connection details
    IR->>Src: Open connection and read in parallel slices
    Src-->>IR: Stream batches of rows
    IR->>Snk: Write batches in bulk
    IR-->>CP: Report progress and final counts
    CP-->>Trig: Mark run succeeded or failed
    
Figure 4. Life of one copy run: the control plane directs and the integration runtime moves the data.

Speed controls inside Copy

Power

Data integration units

A DIU is a blended measure of CPU, memory, and network that the Azure IR gives a copy. More units usually mean faster copies for big jobs, with higher cost.

Parallel

Degree of copy parallelism

How many slices read and write at the same time. Too few wastes capacity, too many can overwhelm the source.

Staging

Staged copy

Writes data first to temporary storage, then bulk loads it into a warehouse. Often much faster for warehouse sinks.

Forgiving

Fault tolerance

Lets a copy skip a few bad rows and log them, rather than failing the whole run.

Analogy

Moving a library of one million books to a new building is faster with ten people carrying boxes than with one. Each person takes a different shelf, and a supervisor counts the boxes. Too many people crowding the old building’s doorway, though, would slow everyone down, which is why the parallelism setting needs balance.

!
Warning

ADF can read your source system very hard. A copy with many parallel slices can slow a busy production database for its real users. Start with modest settings, schedule heavy copies for quiet hours, and read from a replica when you can.

10Mapping Data Flows

When data must be reshaped, not just moved, mapping data flows let you do it with boxes and arrows instead of code.

A mapping data flow is a visual way to build data transformations. You drag a source onto a canvas, connect it to transformation boxes, and finish at a sink. Each box does one clear job. Common ones include filter, which keeps only rows that meet a rule; join, which combines two data sets on a shared column; aggregate, which totals or averages rows by group; derived column, which creates or changes a column using a formula; select, which keeps, renames, or reorders columns; pivot, which turns rows into columns; window, which calculates running totals and rankings; lookup, which adds matching information from another data set; and conditional split, which sends rows down different paths depending on a rule.

The visual design is only the surface. When you run it, ADF turns your diagram into code for Apache Spark, a popular engine that splits big data across many machines and works on the pieces at the same time. ADF creates and manages the Spark cluster for you, so you never configure it. This is why data flows can transform very large volumes: the work is spread over many workers. The price of that power is startup time. A fresh cluster can take a few minutes to start, so the Azure IR offers a time to live setting that keeps the cluster warm for a while after a run, so the next run starts quickly.

1

Source

Read raw orders from the data lake.

2

Filter

Remove test orders and cancelled ones.

3

Join

Attach customer and product details to each order.

4

Derived column

Calculate the final price after discounts and tax.

5

Aggregate

Total sales by product and day.

6

Sink

Write the clean summary to the warehouse.

Analogy

A data flow is a recipe card that you draw as pictures. Behind the scenes, ADF hires a team of cooks, the Spark workers, to follow the recipe in parallel. You never see the kitchen, but when the dinner is for a thousand guests, the team makes it possible.

When not to use data flows

Data flows are wonderful for visual transformations at scale, but they are not always the best tool. If your destination is a powerful warehouse or lakehouse that already has a strong engine, it may be cheaper and faster to copy the data in and let that engine transform it with its own language, the ELT approach. If a team already works with notebooks and code in Databricks or Synapse, ADF can simply call those jobs as activities and focus on orchestration. Use each tool where it is strongest.

i
Tip

For a quick check of your logic, turn on debug mode, which starts a temporary cluster and lets you preview the data after each box. Remember to turn it off afterward, because the debug cluster costs money while it is running.

11Parameters, Expressions, and the Metadata-Driven Pattern

The difference between a beginner’s factory and a professional one is reuse. Parameters make one design do the work of a hundred.

A parameter is a value you give a pipeline, dataset, or linked service when it starts, instead of building it into the design. A variable is a value that a pipeline can change while it runs, such as a counter or a message. A global parameter is a value shared by every pipeline in the factory, for example the name of the environment. An expression is a small formula in ADF’s expression language that calculates a value at run time, such as today’s date minus one day, or the file name built from a table name and a time stamp. Expressions turn static designs into flexible ones.

Put these ideas together and you get the most important professional pattern in ADF, the metadata-driven pipeline. Instead of drawing a separate pipeline for each table or file, you keep a small control table, a list that describes what to load: the source system, the table name, the destination folder, and how often to run. One generic pipeline reads that list with a Lookup, loops over it with ForEach, and copies each item using parameterized datasets. To add a new table, you add a row to the list. You do not change or redeploy any pipeline.

flowchart TB
    CT["Control table - list of what to load"] --> LK["Lookup activity reads the list"]
    LK --> FE["ForEach loop over each item"]
    FE --> CP1["Copy table 1"]
    FE --> CP2["Copy table 2"]
    FE --> CP3["Copy table N"]
    CP1 --> LOG["Write result to audit table"]
    CP2 --> LOG
    CP3 --> LOG
    
Figure 5. A metadata-driven design: add a row to the list instead of building a new pipeline.
Analogy

A metadata-driven pipeline is like a bus that follows a route list. To serve a new neighborhood you do not build a new bus. You simply add the stop to the list, and the same bus visits it on its next trip.

Everyday example: two hundred tables in one design

A company must copy two hundred tables from an old system into the cloud. A traditional approach would mean two hundred pipelines to build, test, and maintain. With the metadata-driven design, one pipeline and one control table do the job, and a new table takes five minutes to add.

!
Warning

Over-parameterizing can make designs hard to read. Parameterize what really changes, such as table names and dates, and keep fixed things fixed. A pipeline that no one can understand is a risk, however clever it is.

12Incremental Loading and Safe Re-runs

Copying everything every night is simple, but it wastes time and money. Smart pipelines copy only what changed, and survive being run twice.

A full load copies every row of a table every time. It is simple and fine for small tables. An incremental load copies only rows that are new or changed since the last run. For large tables, this cuts hours to minutes. There are a few common ways to find the changed rows.

MethodHow it worksGood forWatch out for
Watermark columnKeep the highest modified date or number loaded so far, and next time read only rows above itTables with a reliable last-modified columnRows deleted at the source are not noticed
Change tracking or change data captureThe source database records which rows changed, and ADF reads that logSources that support it, and cases needing deletesNeeds to be enabled and managed at the source
File-based loadingLoad only new files, found by name pattern or by last modified timeFolders where files land continuouslyFiles that are edited after arrival
Time windowEach run loads one slice of time, such as one hour, using a tumbling windowTime-stamped data and backfillsLate-arriving data that belongs to old slices

The idea of idempotency

A very important word is idempotent. A pipeline is idempotent if running it twice gives the same result as running it once. This matters because things go wrong: a run fails halfway, someone presses the button twice, or a trigger fires again after a repair. If a pipeline simply appends rows every time, a re-run creates duplicates and your totals double. To avoid that, design the sink step to be safe. You can overwrite the folder for that day, use an upsert that updates existing rows and inserts new ones using a key, or delete the slice before loading it again.

Analogy

An idempotent action is like pressing the lift button for the third floor. Pressing it once or ten times leaves you in the same situation: the lift comes once. A non-idempotent action is like ordering a pizza by pressing a button that adds one more pizza each time. Pressed twice by accident, you get two pizzas.

i
Tip

Design every load so that it can be re-run safely, then recovery becomes simple: fix the cause and press run again. This one habit removes a huge amount of stress from daily operations.

13Error Handling, Retries, and Reliability

Data pipelines run at night, unwatched. Reliability means they cope with trouble and tell you clearly when they cannot.

Every activity has a retry policy. You choose how many times ADF should try again after a failure and how many seconds to wait between tries. Many problems are short-lived, such as a database that is briefly busy, or a network hiccup, and a retry or two cures them. Each activity also has a timeout, the longest it may run before ADF stops it. The default timeout is very long, so it is wise to set a realistic limit. Otherwise a stuck step may hold a pipeline for days.

For failures that retries cannot fix, use failure paths. Draw an arrow from an activity on failure to an alert step, such as a web call to a messaging tool, a stored procedure that writes the error, or an email service. You can also build a catch-all that runs on completion to clean up temporary files whether things worked or not. A word of caution: how ADF decides the final status of a pipeline depends on how the last steps finished, and a handled failure may leave a pipeline looking successful. Test your error paths and check the status you really see.

Failure scenarios and recovery

A

The source is briefly down

The retry policy tries again after a wait. Most such cases heal themselves.

B

A bad row breaks a copy

Fault tolerance can skip and log it, or the run fails and an alert tells the team to fix the data.

C

The self-hosted machine fails

With several nodes, others take over. With one node, the copy fails until it is restored.

D

A pipeline fails halfway

Use the rerun-from-failed-activity option so you do not repeat the steps that already worked.

E

A missed schedule

A tumbling window can backfill the missing slices. A plain schedule needs a manual run.

F

A regional problem

Keep your designs in Git and be able to deploy the factory into another region, and keep data replicated where it matters.

!
Warning

ADF stores only the design and the run history, not your data. If you lose a factory without a Git copy, the designs are lost. Always connect source control, so that your factory can be rebuilt from the repository.

Analogy

A retry is like trying a locked door a second time because the key sometimes sticks. A failure path is like a fire alarm that rings in the control room. A rerun from the failed step is like restarting a long train journey from the station where it broke down, not from the first station.

14Security and Networking

A data factory touches nearly every important system in a company, so its security matters a great deal.

Start with identity. Every data factory can have a managed identity, an automatic identity in Microsoft Entra ID, the Azure identity system. You give that identity access to the data stores it needs, and ADF logs in as itself, so no password has to be stored anywhere. Where a password or key is unavoidable, store it in Azure Key Vault and let the linked service fetch it at run time. A user-assigned identity can be shared and reused when several services need the same access.

Next, who may change things. Azure role based access control decides who can create, edit, or run in a factory. Built-in roles such as Data Factory Contributor allow designing, while narrower roles can allow only monitoring. Apply the rule of least privilege: people and systems get only the access they need.

Then the network. By default the Azure IR connects over the public internet, protected by encryption. For stricter needs, use the managed virtual network and managed private endpoints, so ADF reaches storage and databases over private addresses. The data store owner must approve each private endpoint, which also protects against data exfiltration, meaning data being sent to places it should not go. For on-premises sources, the self-hosted IR makes only outbound connections, so no inbound firewall holes are needed. You can also disable public network access to the factory itself and reach it through a private endpoint.

Identity

Managed identity

ADF logs in without a stored password.

Secrets

Azure Key Vault

Keeps passwords and keys outside the designs.

Access

Role based access control

Limits who can design, run, or only look.

Network

Managed private endpoints

Private paths to data stores with owner approval.

Encryption

At rest and in transit

Data and design metadata are encrypted. Customer-managed keys are available for the factory.

Governance

Purview lineage and policies

Connects to data governance tools to show where data came from and went.

Analogy

Think of a factory security office. The managed identity is the staff badge that opens doors without anyone carrying keys. Key Vault is the locked key cabinet for the rare door that still needs a key. Private endpoints are sealed corridors between buildings so that goods never travel in open streets.

i
Tip

Mark secret values as secure so they never appear in run logs. Also review who can see activity inputs and outputs, since they can contain table names, file paths, and other sensitive details.

15Source Control and Deployment

Professional teams do not edit production directly. They design in one place, test in another, and release in a controlled way.

ADF connects to Git, the standard system for tracking changes to files, through Azure DevOps or GitHub. Every pipeline, dataset, and trigger is stored as a small text file in a repository, so you get a full history of who changed what and when, and you can work in separate branches without disturbing others. When your work is ready, you merge it into the collaboration branch and publish, which pushes the designs into the live factory and creates a deployment package of the whole factory.

Real projects use several factories, usually called environments: development, test, and production. A release pipeline, built in a tool such as Azure DevOps or GitHub Actions, takes the deployment package from the development factory and applies it to test and production factories. Values that differ between environments, such as server names and Key Vault addresses, are replaced using parameters at deployment time. Triggers are usually stopped before a deployment and restarted after, so that no run begins while the design is half-updated.

flowchart LR
    DEV["Developer branch"] --> PR["Pull request and review"]
    PR --> COL["Collaboration branch"]
    COL --> PUB["Publish creates deployment package"]
    PUB --> TEST["Test factory"]
    TEST --> APPR["Approval"]
    APPR --> PROD["Production factory"]
    
Figure 6. A safe release path from a developer’s idea to the production factory.
1

Branch and design

Create a branch, build or change a pipeline, and test it with debug runs.

2

Review

A teammate reviews the change in a pull request before it merges.

3

Publish

The merge is published, creating the package for release.

4

Deploy to test

The release applies the package to a test factory with test connections.

5

Approve and deploy to production

After checks, the same package goes live, with triggers stopped and restarted around it.

!
Warning

Connect Git only to the development factory. Test and production factories should receive changes through releases, not by hand. Editing production directly is the quickest way to create differences that nobody can explain later.

16Monitoring, Logging, and Metrics

A quiet pipeline is not always a healthy one. Good monitoring tells you about trouble before your users do.

The first place to look is the Monitor hub in Data Factory Studio. It lists every pipeline run, every trigger run, and every activity run, with status, start time, duration, and error messages. You can drill into a failed activity and see its inputs, its outputs, and the exact error. One important fact: ADF keeps this run history for only about forty-five days, so if you need longer history for audits or trend analysis, send it elsewhere.

That is done with Azure Monitor. You can turn on diagnostic settings to send logs to a Log Analytics workspace, a searchable store with a query language, or to storage for long retention. You can also use metrics, which are numbers over time, such as the count of succeeded and failed pipeline runs, failed activity runs, failed trigger runs, and the CPU use of a self-hosted integration runtime. On top of those, set alerts, rules that notify you through email, text, or a chat tool when a number crosses a line.

What to watchWhy it mattersTypical action
Failed pipeline runsShows data that did not arriveAlert at once, check the error, rerun from the failed step
Failed trigger runsA trigger that cannot start means nothing runsCheck permissions and trigger state
Run duration against normalA job getting slower often warns of troubleCompare with history and look at the source or sink
Rows read and writtenA sudden zero or spike signals bad dataAdd checks that fail the pipeline when counts look wrong
Self-hosted IR CPU and memoryAn overloaded machine slows every copyAdd nodes or use a bigger machine
Queued activitiesWaiting work means not enough capacity or concurrencyAdjust parallelism and schedule spacing

Everyday example: the quiet failure

A pipeline succeeds every night, but the dashboard is empty on Tuesday. The run history shows zero rows copied because the source system was restarted and returned nothing. The team adds a check step that fails the pipeline when the row count is zero, and an alert that wakes the on-call engineer, so the problem is found within minutes next time.

i
Tip

Write your own audit table that records, for every run, what was loaded, how many rows, and when. This business-level log is often more useful to the team than technical logs.

17Performance Tuning

Slow pipelines cost time and money. Tuning starts with finding the real bottleneck, not guessing.

Every data movement has three parts: reading from the source, carrying the data across the network, and writing to the sink. The whole job can only go as fast as its slowest part. So the first rule of tuning is to measure. After a Copy run, ADF shows a breakdown of how long each stage took and which part was the bottleneck. If the source is slow to answer, adding more copy power does nothing. If the sink is overloaded, you need to relieve the sink.

Source

Read in parallel, read less

Split big tables into ranges, select only needed columns, and filter early at the source rather than after copying.

Network

Stay close

Place the runtime in the same region as the data. For on-premises data, give the self-hosted machine good network and more nodes.

Sink

Write in bulk

Use bulk load options, staged copy for warehouses, and compact column file formats such as Parquet.

Files

Avoid tiny files

Millions of small files are slow to list and open. Combine them into fewer, larger files when you can.

Flows

Right-size the cluster

Pick a suitable core count for data flows, keep clusters warm with time to live, and partition data sensibly.

Parallel work

Run independent steps together

Remove needless arrows so unrelated activities run at the same time.

Analogy

Moving water through a hose-pipe system is limited by the narrowest pipe. Fitting a giant pump at the start does nothing if a thin pipe sits further along. Tuning is the process of finding that thin pipe and widening it, rather than buying more pumps.

!
Warning

Speed has a price. More data integration units, more cluster cores, and more parallel slices cost more per run, and they can overload the systems you read from or write to. Aim for the speed the business needs, not the maximum possible.

Everyday example: the slow warehouse load

A copy into a cloud warehouse takes three hours. The breakdown shows most time spent inserting row by row. After enabling staged copy with bulk loading, the same data loads in twenty minutes without changing anything else.

18Cost and Capacity Management

ADF is pay-as-you-go. That is kind to small projects and can surprise large ones.

ADF billing has several parts, and understanding them is the key to controlling cost. Orchestration is charged by the number of activity runs and trigger runs, in units of a thousand. Data movement is charged for Copy activities by the time they run multiplied by the data integration units used, and the rate differs between the Azure IR and the self-hosted IR. Data flow execution is charged by the cluster’s core count and the time it runs, so a long-running cluster with many cores is the largest single cost for many teams. External activities, which hand work to other services, have a small orchestration charge, while the other service bills its own compute separately. The Azure-SSIS IR is billed for the virtual machines for as long as it is running. There are also small charges for reading and writing factory entities and for monitoring operations. Check the current price list, since rates change.

Cost leverHow it saves moneyTrade-off
Use Copy instead of a data flow for plain movementCopy is cheaper than starting a Spark clusterCopy only does simple reshaping
Do heavy transformation in the destination engineUses compute you already pay forNeeds skills in that engine
Tune data integration unitsStops paying for power a small job cannot useNeeds testing and measuring
Set time to live thoughtfullyWarm clusters avoid long startups in busy timesA warm idle cluster costs money
Stop the SSIS runtime when idlePays for virtual machines only while neededNeeds a start and stop schedule
Load incrementallySmaller data and shorter runsMore design effort
Avoid needless runsFewer activity and trigger runs to pay forNeeds careful scheduling
Use the self-hosted IR for large on-premises copiesLower per-hour rate for movement on your own machinesYou pay for and manage the machines
Analogy

ADF’s bill is like a taxi fare with several meters: one for each time you call the cab, one for the distance traveled, and one for how long the engine runs while you wait. To lower the fare, make fewer trips, take direct routes, and do not leave the taxi waiting outside with the engine running.

i
Tip

Use Azure Cost Management to tag and track costs by factory and project, and review the most expensive pipelines monthly. A single forgotten debug cluster or an hourly pipeline nobody uses can quietly cost more than the useful work.

19Advantages, Disadvantages, and Trade-offs

No tool is right for everything. A fair look at both sides helps you choose with open eyes.

Advantages

  • Fully managed and serverless, with no machines to patch or size.
  • Visual authoring that lets many people build and read pipelines.
  • Large library of ready-made connectors to cloud, on-premises, and software services.
  • Handles both cloud and private network data through different integration runtimes.
  • Built-in scheduling, event triggers, retries, monitoring, and alerting.
  • Scales big copies and Spark-based transformations without cluster management.
  • Lets you run existing SSIS packages in the cloud.
  • Works well with Git and standard release practices.

Disadvantages

  • Not designed for very low delay streaming. It is best for batch and micro-batch work.
  • Data flows have cluster startup time and can be costly if left running.
  • Complex logic can become hard to read in a visual canvas.
  • Expression language has a learning curve, and errors can be cryptic.
  • Limits on activities per pipeline and other quotas require design care.
  • Run history is kept for a limited time unless you export it.
  • Cost can grow quickly with many small activities or long data flows.

The big trade-offs

Visual simplicity versus fine control. Boxes and arrows are quick to build and share, while code in a notebook gives finer control and easier testing for tricky logic. Orchestration versus transformation. ADF is superb at deciding what runs when, but it is often wiser to hand heavy transformation to a specialist engine. Batch versus streaming. ADF excels at scheduled and event-driven batches, while continuous streams belong in services built for them, such as Event Hubs with Stream Analytics or Spark streaming. Managed convenience versus cost. You pay a premium for not running things yourself, which is usually worth it, but must be watched.

20Design Patterns and Choosing the Right Tool

Proven recipes for ADF, and a guide to when other tools fit better.

Pattern: layers of a data lake

A popular design, often called the medallion pattern, organizes a data lake in three layers. The bronze layer holds raw data exactly as it arrived, which keeps a faithful record. The silver layer holds cleaned, de-duplicated, and standardized data. The gold layer holds business-ready tables shaped for reports and analysis. ADF moves data into bronze, orchestrates the steps that build silver and gold, and tells the business when fresh data is ready.

flowchart LR
    S1["Business systems"] --> ADF1["ADF copy"]
    S2["Files from partners"] --> ADF1
    S3["Software services"] --> ADF1
    ADF1 --> B["Bronze - raw data"]
    B --> T1["Clean and standardize"]
    T1 --> SV["Silver - cleaned data"]
    SV --> T2["Join and aggregate"]
    T2 --> G["Gold - business tables"]
    G --> RPT["Reports and dashboards"]
    
Figure 7. The medallion pattern: raw to cleaned to business-ready, orchestrated by ADF.
Pattern

Metadata-driven loading

One generic pipeline and a control table replace hundreds of copies of the same design.

Pattern

Parent and child pipelines

Small reusable child pipelines called by a parent keep designs short and testable.

Pattern

Landing, then process

Copy raw data first, then transform in a second stage so you can replay without touching the source again.

Pattern

Audit and quality gates

Record counts and checks at each stage, and stop the pipeline when numbers look wrong.

Pattern

Event-driven ingestion

Use storage events to start processing as soon as data lands.

Pattern

Orchestrate other engines

ADF calls notebooks, SQL procedures, and functions, keeping all scheduling and alerts in one place.

Choosing among similar tools

NeedGood fitWhy
Move and orchestrate data across many systemsAzure Data FactoryConnectors, triggers, and monitoring in one managed service
Same pipelines inside a Synapse workspaceSynapse pipelinesBuilt on the same technology, sitting beside Synapse analytics tools
An all-in-one analytics platform with unified storageMicrosoft Fabric Data FactoryPart of the broader Fabric experience
Heavy custom transformation and machine learning in codeDatabricks or Spark, orchestrated by ADFFull code control with ADF as the conductor
Running existing SSIS packagesAzure-SSIS integration runtimeLift and shift without rewrites
Continuous real-time streamsEvent Hubs with Stream Analytics or Spark streamingBuilt for constant low-delay flow
Simple event-based glue between servicesLogic Apps or FunctionsLightweight workflows without data movement scale
i
Tip

Treat ADF as the conductor. It does not have to play every instrument. Let each engine do what it does best and keep the schedule, order, retries, and alerts in ADF.

21Anti-Patterns to Avoid

An anti-pattern is a habit that looks sensible but leads to pain.

ANTI-PATTERN 01Avoid
What people do

Build one huge pipeline that does everything from copying to reporting.

Why it hurts

It is hard to read, test, and rerun, and it can hit the cap on activities per pipeline.

Better approach

Split the work into small child pipelines and call them from a parent.

ANTI-PATTERN 02Avoid
What people do

Hard-code names, paths, and passwords into pipelines and linked services.

Why it hurts

Every environment needs edits, secrets leak into Git, and copies of the same design multiply.

Better approach

Use parameters, global parameters, Key Vault, and managed identities.

ANTI-PATTERN 03Avoid
What people do

Append data on every run without any check for duplicates.

Why it hurts

A retry or double run silently doubles numbers, and no one notices until reports look wrong.

Better approach

Design idempotent loads using overwrite of a slice, upsert on a key, or delete-then-load.

ANTI-PATTERN 04Avoid
What people do

Use data flows for every small copy job.

Why it hurts

Each run starts or occupies a Spark cluster, adding cost and startup delay for work that a Copy activity could do cheaply.

Better approach

Use Copy for movement and reserve data flows for real transformation that needs scale.

ANTI-PATTERN 05Avoid
What people do

Run a single self-hosted integration runtime machine and call it production-ready.

Why it hurts

If that machine fails or is patched, every on-premises copy stops.

Better approach

Run several nodes in the same runtime, size them well, and monitor their load.

ANTI-PATTERN 06Avoid
What people do

Edit production directly and skip source control.

Why it hurts

There is no history, no review, no rollback, and environments drift apart.

Better approach

Use Git on the development factory and releases to test and production.

ANTI-PATTERN 07Avoid
What people do

Use ADF for continuous, second-by-second streaming.

Why it hurts

Tiny frequent runs are expensive and cannot match the low delay of true streaming services.

Better approach

Choose a streaming service for the real-time part and use ADF for batch and orchestration.

22Best Practices and Common Mistakes

A short checklist that separates calm operations from late-night emergencies.

1

Design for re-runs

Make every load safe to run twice and record what each run did.

2

Name things clearly

Use consistent names for pipelines, datasets, and activities so a stranger can read your factory.

3

Keep secrets out of designs

Use managed identities and Key Vault for all credentials.

4

Use source control and releases

Develop in Git, deploy to test and production through a release process.

5

Set retries, timeouts, and alerts

Give every activity a sensible retry and timeout, and send failures to a person who can act.

6

Check data, not just status

Add row count and quality checks, because a green run can still deliver bad data.

7

Keep run history

Send logs to Log Analytics so you can see trends beyond the built-in history window.

8

Review cost regularly

Look for oversized clusters, forgotten debug sessions, and useless schedules.

Common mistakes

  • Forgetting to start triggers. Published triggers that are not started never run.
  • Leaving debug sessions on. Debug clusters keep billing until they time out or are stopped.
  • Choosing the wrong integration runtime. A private on-premises database cannot be reached by the default Azure IR.
  • Ignoring time zones. A schedule set in the wrong zone starts at the wrong hour, and daylight saving changes can shift or repeat runs.
  • Overloading the source. Too many parallel copies can slow the very system the business depends on.
  • Trusting schema forever. A column added or renamed at the source may break a mapping, so handle schema changes deliberately.
  • No owner for alerts. Alerts that go to nobody are the same as no alerts.
!
Warning

A pipeline that works in development with small data may behave very differently in production with real volumes. Test with realistic data sizes before you promise a delivery time to the business.

23Real-World Usage Patterns

Where does Azure Data Factory shine in practice?

Building a data warehouse or lakehouse

Retailers, banks, and manufacturers use ADF to bring data from many operational systems into a central lake or warehouse each night, then refresh the tables that feed their dashboards. This is the most common use by far.

Cloud migration of data

When a company moves from its own servers to the cloud, ADF copies historical data in bulk and then keeps both sides in step with incremental loads until the cutover day.

Software service and partner data

Marketing, finance, and support teams use ready connectors to pull data from software services into one place, and event triggers handle files that partners send on their own timing.

Orchestrating analytics and machine learning

Data teams use ADF as the conductor that prepares data, calls notebooks that train or score models, loads the results, and notifies the business, all with retries and alerts.

Modernizing SSIS

Companies with years of SSIS packages run them in the Azure-SSIS runtime to leave their old servers behind quickly, and later rebuild the most valuable packages as native pipelines.

Regulatory and audit reporting

Regulated industries use scheduled pipelines with audit tables, source control, and lineage tracking to show exactly how reported numbers were produced.

Let Azure Data Factory be the conductor: it keeps every instrument in time, so the music of your data arrives on schedule.

24Frequently Asked Questions

Q1Is Azure Data Factory an ETL tool?

Yes, and an ELT and orchestration tool too. It moves data, can transform it with data flows, and coordinates other services that transform it.

Q2Do I need to write code to use it?

Not for most work. You build pipelines visually. Code appears mainly in small expressions and when you call code-based services such as notebooks or stored procedures.

Q3What is the difference between a pipeline and an activity?

A pipeline is a group of steps that does one job. An activity is one step inside it.

Q4What is a linked service compared with a dataset?

A linked service is the saved connection to a system. A dataset points to the exact data inside that system, such as one table or folder.

Q5Which integration runtime should I use?

Use the Azure IR for cloud and internet-reachable data, a managed virtual network version when it must stay private, the self-hosted IR for on-premises or private networks, and the Azure-SSIS IR to run existing SSIS packages.

Q6When should I use a tumbling window trigger instead of a schedule?

When each time slice must be processed exactly once, with retries per slice, dependencies between runs, and the ability to backfill missed periods.

Q7Can ADF handle real-time streaming?

Not as its main purpose. It is built for batch and event-driven work. Use a streaming service for continuous low-delay flows, and let ADF orchestrate around it.

Q8How do I avoid storing passwords?

Use the factory’s managed identity where a service supports it, and store any remaining secrets in Azure Key Vault referenced from the linked service.

Q9How long is run history kept?

About forty-five days in the built-in monitor. Send diagnostic logs to Log Analytics or storage if you need longer retention.

Q10How do I move my work from development to production?

Connect Git to the development factory, publish to create a deployment package, and use a release pipeline to apply it to test and production with environment-specific parameters.

Q11Why is my data flow slow to start?

A new Spark cluster must start before the flow runs, which can take a few minutes. A time to live setting keeps the cluster warm between runs, at a cost.

Q12How does ADF relate to Synapse pipelines and Fabric Data Factory?

They share many ideas and similar building blocks, but live in different products. ADF is a standalone Azure service, Synapse pipelines sit inside a Synapse workspace, and Fabric includes its own Data Factory experience. Check Microsoft’s current guidance when choosing.

25Summary and Key Takeaways

Key Takeaways

  • What it is: Azure Data Factory is a managed, serverless service that moves data, transforms it, and orchestrates everything on schedules and events, with no servers for you to run.
  • How it is built: Pipelines hold activities, linked services hold connections, datasets point to data, triggers start runs, and integration runtimes do the real work.
  • Where it runs: Choose the Azure IR for cloud data, a managed virtual network for private cloud data, the self-hosted IR for on-premises data, and the Azure-SSIS IR for existing SSIS packages.
  • How it stays reliable: Use retries, timeouts, failure paths, idempotent loads, tumbling windows for backfill, multiple self-hosted nodes, and Git for recovery of designs.
  • How it stays safe: Use managed identities, Key Vault, least-privilege roles, private endpoints, and a controlled release process.
  • How to scale designs: Use parameters and metadata-driven pipelines, small child pipelines, and the right tool for each job, with ADF as the conductor.
  • How to run it well: Measure bottlenecks, load incrementally, check data quality, send logs to Log Analytics, alert a real owner, and review cost on a regular schedule.