Most Microsoft data estates have a Data Factory somewhere in them. It copies files from an SFTP server, pulls tables from an on-premises SQL Server and runs a nightly job that someone set up years ago. It often works well. It also tends to collect business logic that belongs elsewhere, until nobody can say why a figure in a report is what it is.
Data Factory is Microsoft's managed service for moving data between systems and orchestrating the steps that process it. It exists as Azure Data Factory, an Azure resource, and as Data Factory inside Microsoft Fabric. Its job is to connect to sources, copy data into storage, schedule work and call other compute. It is not where business definitions should live.
This guide is for data leads and engineers in Microsoft estates who own a Data Factory, have inherited one, or are deciding whether to build on Azure or Fabric. It covers the core concepts, the difference between the two versions, what drives cost and the patterns that keep a factory maintainable. We build data foundations on Azure and Microsoft Fabric, among other platforms, and the view here is the one we use when we scope that work.
What Data Factory is
Data Factory is a data integration service. It connects to sources such as databases, file stores, SaaS applications and APIs, copies data to a destination and coordinates the steps that follow. It is serverless and fully managed. You do not run servers for it, except where you install a self-hosted runtime to reach a private network.
It does two jobs. The first is ingestion: getting data out of source systems and into storage you control. The second is orchestration: running tasks in the right order, waiting on dependencies, retrying failures and raising alerts. Our guides to batch, streaming and CDC ingestion and to how pipelines get scheduled, retried and rerun cover each job in more depth.
ETL, ELT or both
Data Factory can do ETL. Mapping data flows let you build transformations visually, and Data Factory runs them on Spark clusters it manages. It can also do ELT. It copies raw data into a lake or warehouse, then calls SQL, a stored procedure, a Databricks notebook or a dbt job to transform it in place. The design choice matters more than the label. Our comparison of ETL and ELT explains the trade-off. In most modern warehouse designs we prefer ELT, with Data Factory doing the extract and the load.
Core concepts: pipelines to runtimes
Pipelines and activities
A pipeline is a logical group of activities that together do one unit of work, such as loading yesterday's orders. An activity is a single step inside a pipeline. Activities fall into three kinds.
- Data movement. The Copy activity reads from a source and writes to a destination, called a sink, with options for format conversion, column mapping and incremental loads.
- Data transformation. Mapping data flows, stored procedures, Databricks notebooks, Spark jobs and calls to other compute services.
- Control flow. ForEach loops, If conditions, Lookup, Wait, Execute Pipeline and web calls, which set the order and logic of a run.
Pipelines take parameters. One pipeline can load many tables if you pass in the table name at run time. This is the basis of the metadata-driven pattern described later in this guide.
Linked services and datasets
A linked service holds the connection information Data Factory needs to reach an external system: a server name, an account and an authentication method. It works like a connection string. A dataset is a named view of the data inside that system, such as a table, a folder or a file pattern. Activities refer to datasets, and datasets refer to linked services. Credentials belong in Azure Key Vault or a managed identity, not typed into the linked service. That one decision makes rotation, audit and promotion between environments much simpler.
Integration runtimes
The integration runtime is the compute that does the work. It sits between the activity and the linked service. There are three types.
- Azure integration runtime. Microsoft-managed compute for cloud sources and for running mapping data flows.
- Self-hosted integration runtime. Software you install on a machine inside your own network, so Data Factory can reach on-premises databases and file shares without exposing them to the internet.
- Azure-SSIS integration runtime. A managed cluster that runs existing SQL Server Integration Services packages, which helps when you move an SSIS estate to the cloud.
The runtime affects network security, performance and cost. Treat it as a design decision, not a default.
Triggers
A trigger decides when a pipeline runs. Schedule triggers run on a clock. Tumbling window triggers run for fixed, contiguous time slices and can rerun a missed slice, which suits incremental loads. Event-based triggers start a run when a file lands in storage. You can also start a pipeline manually or through an external call.
How a first pipeline comes together
The steps are the same whether you work in Azure or in Fabric. Getting the first pipeline right sets the pattern every later pipeline will copy.
- Create the factory in the Azure portal, or open a Fabric workspace, and connect it to Git before you build anything.
- Create linked services, or connections in Fabric, for the source and the destination, with credentials held in Key Vault.
- Define datasets for the source table and for the target folder in the bronze layer.
- Add a Copy activity to a new pipeline, set the source and sink, and choose an incremental load method.
- Add the next step, such as a dbt job or a stored procedure, and set it to run only on success.
- Debug the pipeline, check the output, then add a trigger and publish.
Azure Data Factory vs Data Factory in Fabric
Microsoft now offers Data Factory in two places. Azure Data Factory is a resource in an Azure subscription, billed per use. Data Factory in Microsoft Fabric is one workload inside Fabric, the software-as-a-service analytics platform, and it draws on the Fabric capacity you have bought. Standalone Azure Data Factory remains fully supported. Newer features, including Copilot integration, are being directed primarily towards Fabric.
What changes in Fabric
- Pipelines carry over. Fabric pipelines use the same model of activities and control flow, and most Azure Data Factory skills transfer.
- Dataflow Gen2 takes the place of mapping data flows as the main low-code transformation tool. It is built on Power Query, the engine also used in Power BI and Excel.
- Connections replace linked services, and the on-premises data gateway takes the role of the self-hosted integration runtime.
- Destinations sit in the same platform. A pipeline can land data straight into a Fabric lakehouse or warehouse in OneLake, the storage layer every Fabric workload shares.
- Billing moves from per-activity charges to consumption of Fabric capacity.
Which one to choose
If you have committed to Fabric for your warehouse and reporting, Data Factory in Fabric keeps ingestion, storage and Power BI under one capacity, one security model and one workspace. If your estate is built on Azure services such as Databricks or Azure SQL, and you have no plan to adopt Fabric, Azure Data Factory remains a sound choice and there is no forced move. If you run SSIS packages today, check current Fabric support for them before you plan anything. Our guide to Azure data warehouse options covers the wider platform decision.
Moving pipelines from Azure Data Factory into Fabric is a migration, even when the concepts match. Expressions, connections, triggers and runtime settings all need checking. The outputs need reconciling against the old runs before you switch off the original.
What drives Data Factory cost
Microsoft publishes its rates and changes them from time to time, so this section describes what you pay for rather than what it costs. Azure Data Factory charges for several separate things. Most surprises come from one of them growing without anyone noticing.
- Orchestration. Each activity run and trigger run is counted. A pipeline that loops over hundreds of tables every few minutes generates a very large number of runs.
- Data movement. Copy activities are charged for the compute used over the length of the copy, measured in data integration units on the Azure runtime. Slow sources make copies run longer and cost more.
- Self-hosted runtime work. Activities on a self-hosted runtime are charged at a different rate, and you also pay for the machine that hosts it.
- Mapping data flows. These run on Spark clusters billed by core and by time, including start-up time. Heavy transformation in data flows is often the largest line on the bill.
- Operations and monitoring. Reading, writing and monitoring pipeline objects carries a small charge that grows with very busy designs.
- Inactive pipelines. A pipeline with no runs in a month still attracts a small monthly charge.
In Fabric the model is different. You buy a capacity, and pipeline runs, copy jobs and dataflows consume it alongside the warehouse and Power BI. The question becomes whether ingestion leaves enough capacity for everything else, and when you need to size up.
How to keep cost predictable
- Load incrementally. Copy only new or changed rows, using a watermark column or change data capture, rather than full reloads.
- Push transformation to the warehouse. SQL in the warehouse or dbt is usually cheaper and easier to test than Spark data flows.
- Batch small runs. Fewer, larger runs cost less to orchestrate than many small ones.
- Tag and monitor. Use cost tags and the monitoring views to see which pipelines drive spend.
Where it fits in a medallion design
A governed data foundation stores data in stages. In a medallion architecture the bronze layer holds raw data exactly as it came from the source. The silver layer holds cleaned and conformed data. The gold layer holds business-ready tables. A semantic layer sits on top and gives one governed definition of each business term.
Data Factory has a clear place in this design. It lands data in bronze and orchestrates what happens next. It should not own the transformations that turn bronze into silver and gold.
Data Factory should move and schedule data. It should not hold the definition of your business.
What Data Factory should do
- Extract from source systems and load into bronze unchanged, with load metadata such as source, batch and timestamp.
- Handle networking to private sources through the self-hosted runtime or the gateway.
- Run the steps in order: ingestion, then transformation, then tests, then refresh of the semantic model.
- Retry, alert and record what ran, so a failed load is visible before anyone opens a report.
What dbt and the warehouse should do
Transformation logic belongs in version-controlled SQL that runs in the warehouse, and dbt is a common way to manage it. dbt keeps each model in a file, records the dependencies between models, runs tests on every build and generates documentation and lineage. A reviewer can read a change before it reaches production. Logic built in a visual data flow or in pipeline expressions is much harder to review, test and trace.
In practice, Data Factory calls the dbt job, a stored procedure or a Databricks notebook once the bronze load has finished. It waits for the result, then starts the next step. The warehouse does the work and Data Factory keeps time.
Alongside Databricks and data lakes
Data Factory and Databricks are often compared, but they do different jobs. Databricks is a compute and lakehouse platform for heavy transformation, data science and machine learning. Data Factory moves data and coordinates steps. Many Azure estates use both: Data Factory to ingest and schedule, Databricks to transform. A data lake is different again. It is storage, such as Azure Data Lake Storage, and Data Factory is one of the tools that fills it.
Good patterns and common anti-patterns
Patterns that hold up
- Metadata-driven pipelines. One parameterised pipeline reads a control table that lists sources, tables and load types, then loops through them. Adding a table becomes a new row, not a new pipeline.
- Git integration from the start. Connect the factory to Azure DevOps or GitHub, work in branches and promote through development, test and production with a release process.
- Managed identities and Key Vault for every connection.
- Idempotent loads. A rerun of the same window gives the same result, so recovering from a failure is safe.
- Alerts that reach a person. Failures go to the team that owns the source, with enough context to act.
Anti-patterns to avoid
- Business rules in pipeline expressions. A filter or calculation hidden in a Copy activity query cannot be tested, and the people who use the report cannot find it.
- Transformation spread across tools. Some logic in data flows, some in stored procedures and some in Power BI produces three versions of the same metric.
- One hand-built pipeline per table. It works for a handful of tables and breaks down at scale, because every change has to be made many times.
- Full reloads by default. They waste money and hide the lack of a reliable way to track changes.
- Editing the live factory. Changes made directly in production, outside Git, leave no history and cannot be rolled back.
- Treating the factory as the catalogue. Pipeline names and folders are not documentation. Definitions and lineage belong in the transformation code and the semantic layer.
Every rule hidden in a pipeline expression is a rule nobody can test.
Where this leaves you
Data Factory is a capable ingestion and orchestration service. Used for that, it is reliable and predictable. Problems start when it becomes the place where business logic lives, because that logic is then hard to test, hard to find and hard to move. The choice between Azure and Fabric follows from your platform direction. Choose Fabric if you are committing to it for the warehouse and reporting. Choose Azure Data Factory if your estate is built around Azure services and Databricks. Neither forces a move today.
Before you add another pipeline, check three things: where your transformations live, how credentials are held and whether the factory is in source control. If those are right, the rest is detail. If they are not, fix them first, because each new pipeline makes the fix larger. Our guide to Azure data engineering sets out the wider skills and services around Data Factory.
We design and build data foundations on Azure and Microsoft Fabric. Data Factory or Fabric pipelines handle ingestion and orchestration, and the transformation logic sits in tested, version-controlled code that feeds a governed semantic layer. See the data foundation for how we structure that work, and data migration if you are moving pipelines from SSIS or Azure Data Factory into Fabric, reconciled row by row and supported past cutover. If Data Factory is the wrong tool for what you need, we will tell you. Talk to us for a straight view of what to keep and what to move.
Frequently asked questions
What is Azure Data Factory?
Azure Data Factory is Microsoft's cloud service for data integration and orchestration. It connects to databases, files, SaaS applications and APIs, copies data into storage such as a data lake or warehouse, and runs the steps that follow in order, with retries and alerts. It can transform data through mapping data flows. In a governed design it is best used to land raw data and to call the warehouse, dbt or Databricks for transformation.
What is a Data Factory in Fabric?
Data Factory in Fabric is the data integration workload inside Microsoft Fabric. It offers pipelines, which work much like Azure Data Factory pipelines, and Dataflow Gen2, a low-code transformation tool built on Power Query. It uses connections and the on-premises data gateway in place of linked services and self-hosted runtimes. It lands data straight into OneLake and draws on your Fabric capacity rather than charging per activity.
Is Azure Data Factory part of Fabric?
No. Azure Data Factory is a separate Azure resource with its own billing. Fabric contains its own Data Factory workload, which shares the same pipeline concepts and many of the same activities. The two are related products, not one product. Skills transfer between them, but moving pipelines from Azure Data Factory into Fabric still needs planning, testing and reconciliation against the original runs.
What is replacing Azure Data Factory?
Standalone Azure Data Factory remains fully supported, and there is no forced move. Microsoft's direction is Data Factory in Fabric, and newer features such as Copilot integration are being directed primarily there. If you are committing to Fabric for your warehouse and reporting, build new pipelines in Fabric. If your estate is built around Azure services and Databricks, Azure Data Factory remains a sound choice.
What is the difference between Azure Data Factory and Databricks?
They do different jobs. Azure Data Factory moves data between systems and coordinates the steps of a pipeline: scheduling, dependencies, retries and alerts. Databricks is a compute and lakehouse platform for heavy transformation, data science and machine learning. Many Azure estates use both, with Data Factory ingesting data and calling Databricks notebooks to transform it once each load has finished.
What is the difference between a data factory and a data lake?
A data lake is storage. It holds raw and processed files cheaply, for example in Azure Data Lake Storage. Data Factory is a service that moves data and runs pipelines. It is one of the tools that fills a data lake, by copying data from source systems into it and then triggering the steps that clean and model that data.