Skip to content
TeachTrails
Data EngineeringAzure Data Factory

Azure Data Factory Concepts: Pipelines, Activities, Datasets, Linked Services

The six building blocks of ADF made simple: pipelines, activities, datasets, linked services, integration runtimes and triggers, with the real JSON behind each one.

Sukanya Saha, Technology Consultant

11 min read

Beginner friendly

How the pieces fit together

📊 ADF building blocks

Trigger

When: schedule, tumbling window, file event, or manual

Pipeline

A group of activities with parameters and variables

Copy activity

Moves data

Control activities

ForEach, If, Until, Set Variable...

Transform activities

Data flow, Databricks, stored procedure

Datasets

Which data, in which format

Linked services

How to connect, and with what identity

Integration runtime

The compute that does the work

Linked services: how to connect

A linked service holds connection information, like a connection string. This one connects to ShopKart's app database. Notice there's no password: the factory signs in with its own managed identity (lesson 3).

linkedService/LS_AzureSql_ShopKart.json
{
    "name": "LS_AzureSql_ShopKart",
    "properties": {
        "description": "ShopKart app database. Signs in with the factory's managed identity: no password stored.",
        "type": "AzureSqlDatabase",
        "typeProperties": {
            "connectionString": "Integrated Security=False;Encrypt=True;Connection Timeout=30;Data Source=sql-shopkart-dev.database.windows.net;Initial Catalog=shopkart"
        }
    }
}

When a secret is unavoidable, it stays in Azure Key Vault and the linked service only names it:

linkedService/LS_Blob_Supplier.json
{
    "name": "LS_Blob_Supplier",
    "properties": {
        "description": "The supplier's blob container. The connection string lives in Key Vault.",
        "type": "AzureBlobStorage",
        "typeProperties": {
            "connectionString": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "LS_KeyVault",
                    "type": "LinkedServiceReference"
                },
                "secretName": "supplier-blob-connection"
            }
        }
    }
}

Datasets: which data, in which format

A dataset points at data inside a linked service and says how to read it. This one is “a CSV file with a header in the incoming folder of the supplier-drop container”. The file name is a parameter, so one dataset works for every daily file:

dataset/DS_Blob_SupplierCsv.json
{
    "name": "DS_Blob_SupplierCsv",
    "properties": {
        "linkedServiceName": {
            "referenceName": "LS_Blob_Supplier",
            "type": "LinkedServiceReference"
        },
        "parameters": {
            "fileName": {
                "type": "string"
            }
        },
        "type": "DelimitedText",
        "typeProperties": {
            "location": {
                "type": "AzureBlobStorageLocation",
                "fileName": {
                    "value": "@dataset().fileName",
                    "type": "Expression"
                },
                "folderPath": "incoming",
                "container": "supplier-drop"
            },
            "columnDelimiter": ",",
            "escapeChar": "\\",
            "firstRowAsHeader": true,
            "quoteChar": "\""
        },
        "schema": []
    }
}

Pipelines and activities

A pipeline groups activities. Here's the smallest one in our factory: copy one supplier file into the lake.

pipeline/PL_Copy_Supplier_File.json
{
    "name": "PL_Copy_Supplier_File",
    "properties": {
        "description": "Copy one supplier CSV file into the lake as Parquet.",
        "parameters": {
            "fileName": {
                "type": "string",
                "defaultValue": "orders_2026-11-22.csv"
            }
        },
        "activities": [
            {
                "name": "Copy CSV to Lake",
                "type": "Copy",
                "policy": {
                    "timeout": "0.01:00:00",
                    "retry": 2,
                    "retryIntervalInSeconds": 60
                },
                "typeProperties": {
                    "source": {
                        "type": "DelimitedTextSource",
                        "storeSettings": {
                            "type": "AzureBlobStorageReadSettings"
                        },
                        "formatSettings": {
                            "type": "DelimitedTextReadSettings"
                        }
                    },
                    "sink": {
                        "type": "ParquetSink",
                        "storeSettings": {
                            "type": "AzureBlobFSWriteSettings"
                        }
                    },
                    "enableStaging": false
                },
                "inputs": [
                    {
                        "referenceName": "DS_Blob_SupplierCsv",
                        "type": "DatasetReference",
                        "parameters": {
                            "fileName": {
                                "value": "@pipeline().parameters.fileName",
                                "type": "Expression"
                            }
                        }
                    }
                ],
                "outputs": [
                    {
                        "referenceName": "DS_ADLS_Parquet",
                        "type": "DatasetReference",
                        "parameters": {
                            "folderPath": {
                                "value": "@concat('raw/supplier_orders/', replace(substring(pipeline().parameters.fileName, 7, 10), '-', '/'))",
                                "type": "Expression"
                            },
                            "fileName": {
                                "value": "@replace(pipeline().parameters.fileName, '.csv', '.parquet')",
                                "type": "Expression"
                            }
                        }
                    }
                ]
            }
        ]
    }
}

Read it top to bottom: a parameter fileName, one Copy activity with a retry policy, an input dataset (the CSV) and an output dataset (Parquet in the lake), with expressions computing the paths. You'll run it in lesson 4.

Activity groupExamplesPurpose
Data movementCopyMove data between stores, converting formats
Data transformationData flow, Databricks Notebook/Job, Stored Procedure, Script, HDInsightChange data (in ADF or by calling other compute)
Control flowForEach, If Condition, Switch, Until, Set/Append Variable, Execute Pipeline, Wait, Fail, FilterDecide, loop, branch, stop
Lookup & metadataLookup, Get Metadata, Validation, DeleteRead small results; check files and folders
External callsWeb, Webhook, Azure Function, Azure BatchCall APIs and other services

Activities connect with dependencies: “run B after A succeeded” (green arrow), or after A failed (red), completed (blue) or was skipped (grey). Lesson 10 uses them for error handling. Activities without dependencies run in parallel.

Integration runtimes: where the work happens

Integration runtimeRuns whereUse it for
Azure IR (AutoResolveIntegrationRuntime by default)Microsoft-managed, in AzureCloud sources: Azure SQL, Blob, ADLS, Snowflake, SaaS
Azure IR with managed virtual networkMicrosoft-managed, privateReaching sources through private endpoints, no public internet
Self-hosted IRYour server or VM (Windows), inside your networkOn-premises databases, file shares, private networks
Azure-SSIS IRMicrosoft-managed clusterRunning existing SSIS packages (lift and shift)

A self-hosted IR only makes outbound connections to Azure, so you don't open inbound firewall ports. For high availability, install it on 2–4 machines (nodes). Interviewers love this topic.

Triggers: when pipelines run

TriggerFiresLesson
ScheduleOn a calendar: every day at 6 a.m., every Monday...9
Tumbling windowFixed, back-to-back time windows (each hour), with backfill and retries9
Storage eventWhen a blob is created or deleted9
Custom eventWhen an Event Grid topic gets a matching event9
Manual (Trigger now / debug)When you click it, or via REST API / SDK4

Parameters and variables at every level

KindScopeExample
Global parameterWhole factoryenv = dev / prod
Pipeline parameterPassed in when a run starts; read-onlyfileName, runDate
Pipeline variableChanged during a run (Set/Append Variable)flagFound = true
Dataset parameterMakes a dataset reusable@dataset().fileName
Linked service parameterMakes a connection reusableDatabase name per environment
System variablesSet by ADF@pipeline().RunId, @pipeline().TriggerTime

ADF Studio in two minutes

HubWhat you do there
AuthorBuild pipelines, datasets and data flows on a drag-and-drop canvas; Debug runs
MonitorSee every pipeline, activity and trigger run; rerun from failure; alerts
ManageLinked services, integration runtimes, triggers, Git configuration, global parameters

🎯 Interview questions on this topic

Try to answer out loud first, then tap to check.

Q1Linked service vs dataset?Fresher
A linked service defines the connection to a data store or compute (endpoint, authentication). A dataset is a named reference to specific data within that store (table, file, folder) and its format. Activities use datasets; datasets use linked services.
Q2What types of integration runtime are there?Fresher
Azure IR (fully managed; can use a managed virtual network for private endpoints), self-hosted IR (installed on machines in a private network to reach on-premises or private data; outbound connections only; supports multiple nodes) and Azure-SSIS IR (to run SSIS packages).
Q3How would you connect ADF to an on-premises SQL Server?1–3 yrs
Install a self-hosted integration runtime on a Windows machine that can reach the SQL Server (ideally two nodes for high availability), register it with the factory using its key, create a SQL Server linked service that uses that IR with credentials from Key Vault, then a dataset and Copy activity. The IR connects outbound to Azure, so no inbound ports are opened.
Q4What are the activity dependency conditions?1–3 yrs
Succeeded, Failed, Completed (succeeded or failed) and Skipped. An activity with several dependencies runs when all of them are met; listing several conditions for one upstream activity means any of them. They're the basis for error handling paths.
Q5How do you keep the number of datasets and linked services manageable in a large factory?3+ yrs
Parameterize: generic datasets per format and store (folder/file/table as parameters), linked services parameterized by server or database, global parameters for environment values, and metadata-driven pipelines that loop over a control table of sources instead of one pipeline per table.

Key takeaways

  • Six blocks, one chain: trigger → pipeline → activities → datasets → linked services → runtime.
  • Keep secrets out: managed identity first, Key Vault when you must.
  • Parameterize datasets so a few serve hundreds of files and tables.
  • Know your integration runtimes: interviews always ask.

Frequently asked questions

What's the difference between a linked service and a dataset?

A linked service is how to connect (server, account, authentication), like a connection string. A dataset is which data inside that connection and in what format (a table, a folder, a CSV file with a header). Many datasets can share one linked service.

What is an integration runtime?

The compute ADF uses to run activities. The Azure integration runtime is managed by Microsoft and reaches cloud sources. A self-hosted integration runtime is software you install on a machine in your network to reach on-premises or private sources. The Azure-SSIS runtime runs old SSIS packages.

Are datasets required for every activity?

No. Copy, Lookup and Get Metadata use datasets. Activities like Set Variable, ForEach, If Condition, Wait or Web don't. Data flows use datasets (or inline sources).

What is ADF Studio?

The browser app (adf.azure.com) where you build and monitor factories. Its hubs: Home, Author (pipelines, datasets, data flows), Monitor (runs, triggers, alerts) and Manage (linked services, integration runtimes, triggers, Git, global parameters).

🧠 Quick check: ADF concepts

  1. 1. Where do you put the server name and authentication for a database?

  2. 2. You must copy from a SQL Server in ShopKart's office (no public access). Which integration runtime?

  3. 3. Which is a control activity?

  4. 4. One linked service can be used by...

Azure Data Factory for Beginners

Part 2 of 12: Azure Data Factory Concepts