/adf-master:adf-validation-rulesfrom adf-master
Documents Azure Data Factory activity nesting rules, validation errors, and pipeline limitations. Provides a nesting rule matrix, activity limits, and refactoring patterns for unsupported nesting.
Ships in adf-master. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Azure Data Factory has STRICT nesting rules for control flow activities. Violating these rules will cause pipeline failures or prevent pipeline creation.
Four control flow activities support nested activities:
| Parent Activity | Can Contain | Notes |
|---|---|---|
| ForEach | If Condition | ✅ Allowed |
| ForEach | Switch | ✅ Allowed |
| Until | If Condition | ✅ Allowed |
| Until | Switch | ✅ Allowed |
| Parent Activity | CANNOT Contain | Reason |
|---|---|---|
| If Condition | ForEach | ❌ Not supported - use Execute Pipeline workaround |
| If Condition | Switch | ❌ Not supported - use Execute Pipeline workaround |
| If Condition | Until | ❌ Not supported - use Execute Pipeline workaround |
| If Condition | Another If | ❌ Cannot nest If within If |
| Switch | ForEach | ❌ Not supported - use Execute Pipeline workaround |
| Switch | If Condition | ❌ Not supported - use Execute Pipeline workaround |
| Switch | Until | ❌ Not supported - use Execute Pipeline workaround |
| Switch | Another Switch | ❌ Cannot nest Switch within Switch |
| ForEach | Another ForEach | ❌ Single level only - use Execute Pipeline workaround |
| Until | Another Until | ❌ Single level only - use Execute Pipeline workaround |
| ForEach | Until | ❌ Single level only - use Execute Pipeline workaround |
| Until | ForEach | ❌ Single level only - use Execute Pipeline workaround |
Validation Activity:
The ONLY supported workaround for prohibited nesting combinations:
Instead of direct nesting, use the Execute Pipeline Activity to call a child pipeline:
{
"name": "ParentPipeline_WithIfCondition",
"activities": [
{
"name": "IfCondition_Parent",
"type": "IfCondition",
"typeProperties": {
"expression": "@equals(pipeline().parameters.ProcessData, 'true')",
"ifTrueActivities": [
{
"name": "ExecuteChildPipeline_WithForEach",
"type": "ExecutePipeline",
"typeProperties": {
"pipeline": {
"referenceName": "ChildPipeline_ForEachLoop",
"type": "PipelineReference"
},
"parameters": {
"ItemList": "@pipeline().parameters.Items"
}
}
}
]
}
}
]
}
Child Pipeline Structure:
{
"name": "ChildPipeline_ForEachLoop",
"parameters": {
"ItemList": {"type": "array"}
},
"activities": [
{
"name": "ForEach_InChildPipeline",
"type": "ForEach",
"typeProperties": {
"items": "@pipeline().parameters.ItemList",
"activities": [
// Your ForEach logic here
]
}
}
]
}
Why This Works:
| Resource | Limit | Notes |
|---|---|---|
| Activities per pipeline | 80 | Includes inner activities for containers |
| Parameters per pipeline | 50 | - |
| ForEach concurrent iterations | 50 (maximum) | Set via batchCount property |
| ForEach items | 100,000 | - |
| Lookup activity rows | 5,000 | Maximum rows returned |
| Lookup activity size | 4 MB | Maximum size of returned data |
| Web activity timeout | 1 hour | Default timeout for Web activities |
| Copy activity timeout | 7 days | Maximum execution time |
{
"name": "ForEachActivity",
"type": "ForEach",
"typeProperties": {
"items": "@pipeline().parameters.ItemList",
"isSequential": false, // false = parallel execution
"batchCount": 50, // Max 50 concurrent iterations
"activities": [
// Nested activities
]
}
}
Critical Considerations:
isSequential: true → Executes one item at a time (slow but predictable)isSequential: false → Executes up to batchCount items in parallelbatchCount is 50 regardless of setting❌ CANNOT use Set Variable inside ForEach with isSequential: false
Append Variable with array type, or use sequential executionDetailed validation rules and templates for ADF Linked Services (Azure Blob Storage and Azure SQL Database) — auth types (key, SAS, managed identity, AAD), network configuration, and connection-string patterns — live in references/linked-services.md. Load that reference when authoring or validating a Linked Service JSON.
| Transformation | Limitation |
|---|---|
| Lookup | Cache size limited by cluster memory |
| Join | Large joins may cause memory errors |
| Pivot | Maximum 10,000 unique values |
| Window | Requires partitioning for large datasets |
accountKind is setbatchCount ≤ 50 if parallel executionCRITICAL: Always run automated validation before committing or deploying ADF pipelines!
The adf-master plugin includes a comprehensive PowerShell validation script that checks for ALL the rules and limitations documented above.
Location: ${CLAUDE_PLUGIN_ROOT}/scripts/validate-adf-pipelines.ps1
Basic usage:
# From the root of your ADF repository
pwsh -File validate-adf-pipelines.ps1
With custom paths:
pwsh -File validate-adf-pipelines.ps1 `
-PipelinePath "path/to/pipeline" `
-DatasetPath "path/to/dataset"
With strict mode (additional warnings):
pwsh -File validate-adf-pipelines.ps1 -Strict
The automated validation script checks for issues that Microsoft's official @microsoft/azure-data-factory-utilities package does NOT validate:
Activity Nesting Violations:
Resource Limits:
Variable Scope Violations:
Dataset Configuration Issues:
Copy Activity Validations:
GitHub Actions example:
- name: Validate ADF Pipelines
run: |
pwsh -File validate-adf-pipelines.ps1 -PipelinePath pipeline -DatasetPath dataset
shell: pwsh
Azure DevOps example:
- task: PowerShell@2
displayName: 'Validate ADF Pipelines'
inputs:
filePath: 'validate-adf-pipelines.ps1'
arguments: '-PipelinePath pipeline -DatasetPath dataset'
pwsh: true
Use the /adf-validate command to run the validation script with proper guidance:
/adf-validate
This command will:
When creating or modifying ADF pipelines:
accountKind for managed identity)Example Validation Response:
❌ INVALID PIPELINE STRUCTURE DETECTED:
Issue: ForEach activity contains another ForEach activity
Location: Pipeline "PL_DataProcessing" → ForEach "OuterLoop" → ForEach "InnerLoop"
This violates Azure Data Factory nesting rules:
- ForEach activities support only a SINGLE level of nesting
- You CANNOT nest ForEach within ForEach
✅ RECOMMENDED SOLUTION:
Use the Execute Pipeline pattern:
1. Create a child pipeline with the inner ForEach logic
2. Replace the inner ForEach with an Execute Pipeline activity
3. Pass required parameters to the child pipeline
Would you like me to generate the refactored pipeline structure?
Official Microsoft Learn Resources:
Last Updated: 2025-01-24 (Based on official Microsoft documentation)
This validation rules skill MUST be consulted before creating or modifying ANY Azure Data Factory pipeline to ensure compliance with platform limitations and best practices.
For detailed validation matrices and resource limits, see:
references/nesting-rules.md - Complete matrix of permitted and prohibited activity nesting combinations with workaround patternsreferences/resource-limits.md - Complete reference for all ADF limits (pipeline, activity, trigger, data flow, integration runtime, expression, API)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/adf-masterAzure Data Factory (ADF) CI/CD, deployment, and pipeline development.
PROACTIVELY activate for: (1) ADF CI/CD setup (npm validation, ARM template export), (2) ADF ARM template deployment, (3) ADF npm build validation in CI, (4) PrePostDeploymentScript for trigger and resource cleanup, (5) ADF GitHub Actions workflows, (6) ADF Azure DevOps pipelines, (7) ADF Git integration (collaboration vs publish branch), (8) parameterizing linked services and datasets across environments, (9) ADF triggers (schedule, tumbling window, event), (10) deployment slots and blue-green for ADF.
Provides: complete CI/CD YAML for GitHub Actions and Azure DevOps, PrePostDeploymentScript reference, parameterization patterns, and trigger management recipes.
/adf-ml-analyticsADF + Azure ML and analytics integrations.
PROACTIVELY activate for: (1) Azure ML batch endpoints invoked from ADF, (2) Azure OpenAI Batch API pipeline patterns, (3) ADF ML scoring orchestration, (4) SQL to Storage archival pipelines, (5) AI Services integration via REST connector, (6) Databricks notebook execution from ADF, (7) Data Flow feature engineering, (8) Synapse / Fabric integration from ADF, (9) Cognitive Search indexer triggers, (10) Power BI dataset refresh via REST.
Provides: REST connector recipes, Databricks linked service setup, Data Flow templates, and end-to-end ML scoring pipelines.
npx claudepluginhub josiahsiegel/claude-plugin-marketplace --plugin adf-masterOther plugins' skills for the same job