Debug ADF pipeline failures, analyze error messages, and suggest fixes
Analyzes Azure Data Factory pipeline errors and provides targeted remediation steps.
/plugin marketplace add JosiahSiegel/claude-plugin-marketplace/plugin install adf-master@claude-plugin-marketplace<error-message-or-pipeline-name>Analyze Azure Data Factory pipeline errors and provide targeted solutions.
Debug the provided ADF error or pipeline issue and provide specific remediation steps.
$ARGUMENTS: Either:
ErrorCode: UserErrorActivityRunFailed
error.messageErrorCode: UserErrorFailedToReadSourceData
ErrorCode: UserErrorFailedToWriteSinkData
ErrorCode: SqlServerCannotConnect
Solutions:
1. Verify server name and database name
2. Check firewall allows Azure services or specific IPs
3. Verify credentials (SQL auth) or role assignments (MI/SP)
4. For serverless: implement retry for auto-pause wake-up
ErrorCode: CosmosDbPartitionKeyRangeTooLarge
Solutions:
1. Increase Data Integration Units (DIUs)
2. Add WHERE clause to limit data per copy
3. Partition the copy by date or other key
ErrorCode: DF-EXECUTOR-InvalidDataType
Solutions:
1. Check source column types vs expected types
2. Add explicit cast/convert in transformation
3. Verify date format matches expected pattern
ErrorCode: DF-EXECUTOR-OutOfMemory
Solutions:
1. Increase cluster size (Core Count)
2. Add partitioning before memory-intensive operations
3. Use broadcast join for small dimension tables
4. Optimize transformations to reduce intermediate data
ErrorCode: InvalidParameter
For Blob Storage with Managed Identity:
- CRITICAL: Add "accountKind": "StorageV2" to typeProperties
- Verify MI has Storage Blob Data Reader/Contributor role
For SQL with Managed Identity:
- Create contained user: CREATE USER [<adf-name>] FROM EXTERNAL PROVIDER
- Grant roles: ALTER ROLE db_datareader ADD MEMBER [<adf-name>]
ErrorCode: TriggerFailedToStart
Solutions:
1. Verify pipeline exists and is published
2. Check trigger parameters match pipeline parameters
3. For event triggers: verify Event Grid subscription active
4. For tumbling window: check dependencies are running
Identify Error Location
Check Common Causes
Review Activity Configuration
Test Connectivity
Analyze Monitoring Data
// Find all failures in last 24 hours
ADFActivityRun
| where Status == "Failed"
| where TimeGenerated > ago(24h)
| project TimeGenerated, PipelineName, ActivityName, ErrorCode, ErrorMessage
| order by TimeGenerated desc
// Find long-running activities
ADFActivityRun
| where TimeGenerated > ago(7d)
| extend DurationMinutes = datetime_diff('minute', End, Start)
| where DurationMinutes > 30
| summarize AvgDuration=avg(DurationMinutes), Count=count() by PipelineName, ActivityName
| order by AvgDuration desc
=== ADF Debug Analysis ===
Error: [ErrorCode] - [Short Description]
Pipeline: [PipelineName]
Activity: [ActivityName]
Root Cause:
[Detailed explanation of what caused the error]
Solution Steps:
1. [First step to fix]
2. [Second step to fix]
3. [Verification step]
Prevention:
[How to prevent this in future]
Related Documentation:
- [Link to relevant Microsoft docs]