Master enterprise pipeline orchestration: ADF Studio visual canvas drag-and-drop, complete catalog of 26 activities, Copy Activity throughput tuning (DIU, partitions, staging), and Self-Hosted Integration Runtime (SHIR) high-availability clustering.
[!NOTE] Azure Data Factory (ADF) is Azure's premier cloud-native serverless data integration and workflow orchestration service. Unlike legacy code-only systems, ADF provides both a visual drag-and-drop UI canvas and a fully declarative JSON representation behind every activity.
In ADF Studio (adf.azure.com), data pipelines are constructed visually on a drag-and-drop canvas:
ds_oracle_orders, ds_adls_orders_parquet).┌─────────────────┐ Succeeded ┌─────────────────┐ Succeeded ┌─────────────────────┐
│ LookupActivity │──────────────────────▶│ IfCondition │──────────────────────▶│ ForEachLoop │
│ (Get Watermark) │ │ (Files Exist?) │ │ (Parallel Batches) │
└─────────────────┘ └─────────────────┘ └──────────┬──────────┘
│ Failed │
▼ ▼
┌─────────────────┐ ┌─────────────────────┐
│ WebActivity │ (Teams / Slack Incident Alert) │ CopyActivity │
│ (Alert Webhook) │ │ (Stage to ADLS Gen2)│
└─────────────────┘ └──────────┬──────────┘
│ Succeeded
▼
┌─────────────────────┐
│ Databricks Notebook │
│ (Delta Lake MERGE) │
└─────────────────────┘
| Category | Activity Name | Production Role & Architectural Guidance |
|---|---|---|
| Data Movement | Copy Activity | Moves data between 100+ connectors. Supports DIU scaling, parallel partition queries, staging, and compression. |
| Control Flow | Lookup Activity | Reads up to 5,000 rows (max 4MB). Fetches control tables, high watermarks, and dynamic configs. |
| Control Flow | Get Metadata Activity | Inspects folder childItems, file size, exists flag, and lastModified without reading payload. |
| Control Flow | ForEach Activity | Iterates over array. Supports parallel (up to 50 concurrent items via batchCount) or sequential execution. |
| Control Flow | If Condition Activity | Conditional branch evaluator using dynamic expressions (e.g. @greater(activity('GetMetadata').output.childItems, 0)). |
| Control Flow | Until Activity | Loops activities until expression evaluates to true (polling long-running external tasks). |
| Control Flow | Switch Activity | Multi-branch routing based on case values (e.g. file format routing: CSV vs JSON vs XML). |
| Control Flow | Filter Activity | Filters array items using condition expressions before feeding to ForEach. |
| Control Flow | Set Variable / Append | Manages mutable runtime variables inside pipeline execution context. |
| External Compute | Databricks Notebook | Dispatches PySpark/Delta Lake jobs on interactive or ephemeral automated job clusters. |
| External Compute | Stored Procedure | Executes T-SQL stored procedures on Azure SQL or Synapse (used to update watermark tables). |
| External Compute | Web / Webhook | Web makes synchronous HTTP REST calls (e.g. alerting). Webhook waits for asynchronous callback with callbackUri. |
| External Compute | Azure Function | Executes custom serverless Python/C# code for complex parsing or token generation. |
| Transformation | Mapping Data Flow | Visual, code-free Spark transformations executed on managed behind-the-scenes Spark clusters. |
When your pipeline needs to pull data from on-premise databases (Oracle, SQL Server, IBM DB2) or private VNET resources:
DIU auto or tuned 4–32) strictly for raw binary/tabular movement into Bronze ADLS Gen2; never put complex joins inside ADF Mapping Data Flows when you already have Databricks or Microsoft Fabric Spark clusters running—spinning up Data Flow Spark clusters for 5-minute runs adds massive cold-start overhead unless a long-lived TTL (Time To Live) pool is justified.Lookup + ForEach): Production Azure teams avoid authoring 200 identical pipelines. Store table watermarks, source queries, and target schemas in an Azure SQL Control Table, then drive a single parameterized Lookup -> ForEach(batchCount=20) pipeline.Review the production code, company interview Q&As, incident traces, and comprehension quiz inside this lesson.
{
"name": "pl_dynamic_incremental_ingest",
"activities": [
{
"name": "Lookup_Watermark",
"type": "Lookup",
"typeProperties": {
"source": {
"type": "AzureSqlSource",
"sqlReaderQuery": "SELECT SourceTable, LastWatermark, TargetFolder FROM dbo.etl_control_table WHERE IsActive = 1;"
},
"dataset": { "referenceName": "ds_control_db", "type": "DatasetReference" },
"firstRowOnly": false
}
},
{
"name": "ForEach_SourceTable",
"type": "ForEach",
"dependsOn": [{ "activity": "Lookup_Watermark", "dependencyConditions": ["Succeeded"] }],
"typeProperties": {
"isSequential": false,
"batchCount": 20,
"items": "@activity('Lookup_Watermark').output.value",
"activities": [
{
"name": "Copy_Table_To_ADLS",
"type": "Copy",
"typeProperties": {
"source": {
"type": "SqlServerSource",
"sqlReaderQuery": "@concat('SELECT * FROM ', item().SourceTable, ' WHERE ModifiedDate > ''', item().LastWatermark, '''')"
},
"sink": {
"type": "ParquetSink",
"storeSettings": {
"type": "AzureBlobFSWriteSettings",
"copyBehavior": "FlattenHierarchy"
}
},
"enableStaging": false,
"dataIntegrationUnits": 32
}
}
]
}
}
]
}# Execute on On-Premises Windows Gateway VM to join active SHIR cluster
$AdfResourceGroup = "rg-data-engineering-prod"
$AdfFactoryName = "adf-enterprise-prod"
$ShirName = "shir-onprem-cluster"
# Retrieve SHIR Auth Key from Azure
$AuthKey = (Get-AzDataFactoryV2IntegrationRuntimeKey `
-ResourceGroupName $AdfResourceGroup `
-DataFactoryName $AdfFactoryName `
-Name $ShirName).AuthKey1
# Register node into the 4-node high availability pool
& 'C:\Program Files\Microsoft Integration Runtime\6.0\PowerShellScript\RegisterIntegrationRuntime.ps1' `
-gatewayKey $AuthKey `
-nodeName "SHIR-NODE-02" `
-enableRemoteAccessIntoHostLocalNetwork $true
Write-Host "SHIR Node 02 successfully joined high-availability cluster."Cannot connect to SQL Server on-premise. ErrorCode=UserErrorFailedToConnectToSqlServer. The network path was not found or port 1433 connection timed out.
The response cannot be parsed because the size of the payload exceeds the maximum allowed size of 4MB. ErrorCode: 2108.