metadata-driven orchestration · the guide

What is metadata-driven ETL in Azure Data Factory?

Metadata-driven ETL means the pipeline logic stays generic and the specifics live in a table. Instead of one pipeline per source, a small set of parameterized pipelines reads a control table (which objects to load, from where, to where, full or incremental, in what order) and loops over it. In Azure Data Factory the classic shape is a Lookup activity that reads the control table and a ForEach activity that runs a parameterized Copy for each row. Adding a source becomes an INSERT instead of a new pipeline, and Microsoft ships a wizard in ADF's Copy Data tool that builds this pattern for you.

A disclosure first. ETLMaestro sells a metadata-driven orchestration layer for Azure Data Factory and Microsoft Fabric, so this is a topic we have a stake in. Everything below about ADF comes from Microsoft's own documentation, linked at the end, and where our product fits, the page says so.

Why do teams move ADF pipelines to metadata?

Because pipelines multiply faster than people. An estate that copies 60 tables with 60 near-identical pipelines has 60 places to change when a connection string, a folder path, or a load window changes, and 60 things a new engineer has to open to understand what gets loaded. Microsoft's own guidance for copying large numbers of objects is to keep the list of objects and their copy behavior in a control table and let parameterized pipelines read it, so the list can change without redeploying anything and there is one place to see which objects are copied by which pipelines and triggers.

What does the basic control-table pattern look like?

Four pieces. A control table, usually in Azure SQL, with one row per object to load. A Lookup activity that reads the enabled rows. A ForEach activity that iterates over them, in parallel if you allow it. And inside the loop, a Copy activity whose source and sink come from the current row, followed by a step that records the new watermark for incremental loads.

A minimal control table looks like this. The column names are ours; the shape is the common one.

CREATE TABLE etl.load_control (
  load_id          int IDENTITY PRIMARY KEY,
  source_schema    sysname      NOT NULL,
  source_table     sysname      NOT NULL,
  target_path      nvarchar(400) NOT NULL,
  load_type        varchar(10)  NOT NULL,  -- 'full' or 'delta'
  watermark_column sysname      NULL,
  watermark_value  datetime2    NULL,
  load_order       int          NOT NULL DEFAULT 0,
  is_enabled       bit          NOT NULL DEFAULT 1
);

-- what the Lookup activity runs
SELECT * FROM etl.load_control
WHERE is_enabled = 1
ORDER BY load_order;

The ForEach reads that result set with an expression such as @activity('LookupControl').output.value, and the Copy activity's parameterized datasets pick up @item().source_table and @item().target_path. Parameterized linked services let the same pipeline point at different servers or databases, so one pipeline can serve every source of the same type.

What does Microsoft's metadata-driven copy task build?

A three-level set of pipelines, two control tables, and a stored procedure. In the Copy Data tool you choose the metadata-driven copy task, point it at the source, pick full or delta load per table, and set how many copies may run at once (20 by default). The tool deploys the pipelines and hands you two SQL scripts: one creates a main control table and a connection control table, and the other creates the stored procedure that writes watermarks back after each incremental load.

The pipelines ADF's metadata-driven copy task generates, per Microsoft Learn, verified 2026-09-30.
PipelineWhat it doesWhy it exists
TopLevelCounts the objects to copy and splits them into sequential batchesKeeps concurrency at the limit you set
MiddleLevelDivides one batch into groups and copies each groupStays under the Lookup activity's output limit
BottomLevelLoops over a group, switches between full and delta load, copies, and updates the watermarkDoes the actual work, one object at a time

Two known limitations shape how far one set of pipelines stretches. The integration runtime name, the database type, and the file format cannot be parameterized, so loading from both Oracle and SQL Server means two sets of generated pipelines, although they can share one control table. And the generated SQL uses OPENJSON, so a control table on SQL Server needs SQL Server 2016 or later. For file-based sources the task supports full loads only; incremental loads of new files are not supported.

Which ADF limits shape a metadata-driven design?

The ones on Lookup and ForEach, mostly. A Lookup returns at most 5,000 rows and 4 MB, which is why large control tables are read in groups. A ForEach runs at most 50 iterations in parallel and cannot be nested inside another ForEach, which is why generic designs end up with an outer pipeline calling an inner one. Those workarounds are sound, and they are also how a metadata-driven estate grows its own layers of Execute Pipeline calls. The published limits for ADF and Fabric are listed in ADF and Fabric pipeline limits.

Published Azure Data Factory limits that matter for control-table designs, verified 2026-09-30.
LimitValueWhat it means for the design
Lookup output5,000 rows, 4 MBRead big control tables in groups, or filter per run
ForEach parallelism20 by default, 50 maximumBatch counts above 50 need another level
ForEach items100,000Rarely the constraint for control tables
Nested ForEachNot supportedNested loops become a parent pipeline calling a child
Activities per pipeline120, including inner activitiesGeneric pipelines stay small; sprawl moves into child pipelines
Parameters per pipeline50Pass a row or an ID, not dozens of separate values
Variables in a parallel ForEachGlobal to the pipelineUse a child pipeline for per-item state

Where do order, dependencies, and recovery live?

Outside the copy pattern, unless you build them in. A control table tells ADF what to copy. It does not know that the finance load must finish before the reporting refresh, that a Fabric notebook depends on three copies, or which of last night's 200 iterations failed and should run again. The generated copy task orders work with a TaskId column and nothing more. Inside ForEach and Execute Pipeline, Microsoft notes that a rerun from the failed activity may still skip inner activities according to its rerun rules, so recovering part of a night takes care.

So homegrown frameworks add columns and tables: a load order or phase, a dependency list, a log table written at the start and end of every iteration, a view someone can query to see what is running. Each addition is reasonable. Together they become a framework, and a framework maintained by one person is the master pipeline problem in a new shape.

How far should you take metadata-driven ETL?

As far as your orchestration problem goes, and no further. If you copy one type of source into a lake and the order does not matter, a control table and Microsoft's copy task are enough. If you run several pipeline types, Fabric notebooks, and stored procedures that depend on each other, and people outside engineering need to know whether the data is fresh, the orchestration itself needs to be metadata too: schedules, phases, dependencies, retries, and run history in tables, with a report reading the same rows.

That third level is where ETLMaestro sits, as a product rather than a framework you maintain. It runs your existing ADF pipelines, Fabric notebooks and pipelines, stored procedures, and Logic Apps from metadata rows, in checkpointed phases with retries that rerun only what failed, and reports every run in a Power BI status report. How ETLMaestro works follows a run from start to retry. If you are weighing a code-first scheduler for the same job instead, Airflow vs Azure Data Factory compares the two directly, and master pipeline vs Airflow shows what changes when Airflow runs your ADF pipelines.

Sources and verification

Every ADF fact above was checked on 2026-09-30 against Microsoft Learn.

See orchestration as metadata, running

The demo walks the full loop: insert a metadata row, watch the process appear, fail it on purpose, and watch the retry rerun only what failed.