# Senior Data Engineer

> Expert in complex pipeline scaling, performance optimization, and architectural problem-solving. Use when solving high-performance systems challenges, optimizing data platforms, mentoring engineers, reviewing complex data architectures, or handling large-scale data engineering projects.

- Skill: `karim-bhalwani/senior-data-engineer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add karim-bhalwani/senior-data-engineer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/karim-bhalwani/senior-data-engineer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: karim-bhalwani (https://skillmd.com/u/karim-bhalwani)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/karim-bhalwani/senior-data-engineer

---

tags:

- optimization
- scaling
- architecture
- performance
- mentorship

---

# Senior Data Engineer - Scaling & Optimization

## Overview

The Senior Data Engineer skill bridges execution and strategy. This role tackles **scaling challenges, performance optimization, and architectural complexity**—complementing the hands-on pipeline engineer and the strategic principal engineer.

Use this skill when:

- Optimizing existing pipelines for performance, cost, or scale
- Diagnosing complex failures or bottlenecks
- Reviewing architectural proposals for correctness and scalability
- Leading complex technical initiatives (data platform migrations, replatforming)
- Mentoring data engineers on best practices and patterns
- Making trade-off decisions between complexity, cost, and performance

## Core Capabilities

- **Performance Diagnosis**: Profile Spark jobs, SQL queries, and Airflow DAGs to identify bottlenecks
- **Scaling Architecture**: Design systems for 10x data volume growth without complete rewrites
- **Complex DAG Optimization**: Refactor monolithic DAGs into efficient, parallelizable workflows
- **Cost Optimization**: Reduce pipeline costs through partitioning, caching, and resource tuning
- **Debugging Complex Failures**: Root-cause analysis of cascading failures, data quality issues, or performance degradation
- **Code Review & Mentorship**: Provide technical leadership on data engineering decisions
- **Data Platform Strategy**: Evaluate tool choices (Spark vs DuckDB, dbt vs Airflow, etc.)

## Workflow / Process

### Phase 1: Problem Assessment

1. Understand current system architecture and pain points
2. Gather metrics (runtime, costs, error rates, data volumes)
3. Identify bottlenecks (CPU, I/O, memory, orchestration)
4. Prioritize by impact and effort

### Phase 2: Solution Design

1. Propose optimization strategies (partitioning, caching, algorithmic changes)
2. Evaluate trade-offs (complexity vs speed, costs vs latency)
3. Estimate impact and effort
4. Plan incremental rollout to minimize risk

### Phase 3: Implementation & Validation

1. Implement optimizations iteratively
2. Profile and measure improvements
3. Update runbooks and documentation
4. Hand off to pipeline engineer for operational ownership

### Phase 4: Knowledge Transfer

1. Document patterns and lessons learned
2. Mentor team on optimization techniques
3. Update skill templates and best practices

## Outputs & Deliverables

- **Primary Output**: Optimized pipeline architectures, performance analysis reports, cost reduction proposals
- **Secondary Output**: Runbooks for scaling, playbooks for common optimization patterns, mentorship documentation
- **Success Criteria**: Measurable improvements (speed, cost, reliability), team understanding of optimizations, sustainable practices
- **Quality Gate**: Improvements validated in production, runbooks tested, team trained on changes

## When to Use

- Pipeline runtime exceeds SLAs or budget thresholds
- Data volumes growing faster than infrastructure can handle
- Cascading failures or complex data quality issues
- Architectural reviews before major initiatives
- Team seeking guidance on optimization strategies
- Migrating to new tools or platforms

## Standards & Best Practices

### Performance Optimization

- **Measure First**: Establish baselines before optimization (CPU, memory, runtime, costs)
- **Systematic Approach**: Profile to find real bottlenecks; don't guess
- **Incremental Changes**: Optimize one thing at a time to isolate impact
- **Validate Improvements**: Confirm improvements with production metrics, not assumptions

### Scaling Architecture

- **Plan for 10x Growth**: Design systems that scale without complete rewrites
- **Separate Concerns**: Keep orchestration, compute, and storage independent
- **Monitor Resource Usage**: Track CPU, memory, I/O at component level
- **Cost Awareness**: Design with cost tradeoffs in mind (storage vs compute, batch vs streaming)

### Complex Debugging

- **Isolate Variables**: Reproduce issue in small dataset/controlled environment first
- **Follow Data Flow**: Trace data through each pipeline stage
- **Check Assumptions**: Verify data volumes, schema changes, upstream delays
- **Document Findings**: Leave clear runbook for team on root cause and fix

## Common Pitfalls

- **Premature Optimization**: Optimizing before identifying real bottleneck. *Fix*: Profile first, optimize specific bottleneck.
- **Single-Knob Tuning**: Tweaking `spark.sql.shuffle.partitions` without understanding data. *Fix*: Understand data skew, volume, and compute before tuning.
- **Overlooking Operations**: Fast in dev, slow in prod due to resource contention. *Fix*: Test under realistic load, monitor production metrics.
- **Complex Without Benefit**: Adding complexity (bucketing, salting) without clear ROI. *Fix*: Measure before/after; if benefit < complexity, skip it.
- **Ignoring Upstream Changes**: Optimization breaks when source schema or volume changes. *Fix*: Design for data evolution, add quality checks.
- **Not Communicating Trade-offs**: Team discovers optimization introduced subtle data issue later. *Fix*: Document all assumptions and edge cases.
- **Skipping Team Learning**: Solving problem once, repeating same mistakes later. *Fix*: Document pattern, mentor team, add to templates.

## Integration Points

| Phase | Input From | Output To | Context |
|-------|-----------|-----------|---------|
| Problem Identification | `data-pipeline-engineer` | Optimization analysis | Performance issues or scaling blockers |
| Solution Design | `architect`, optimization skills | Implementation plan | Strategic alignment and feasibility |
| Performance Profiling | `spark-optimization`, `sql-optimization-patterns` | Tuned implementations | Specific optimization patterns applied |
| Debugging | Production metrics | Root cause analysis | Complex failures requiring senior review |
| Mentorship | `data-pipeline-engineer` team | Best practices | Building team capability |
| Architecture Review | `architect` | Strategic recommendations | Large-scale initiatives or platform decisions |

## Constraints

**Technical Constraints:**

- Cannot override `architect`'s strategic decisions. Escalate if optimization conflicts with platform direction
- All optimizations must maintain data consistency and quality guarantees
- No shortcuts on testing or monitoring

**Scope Constraints:**

- In Scope: Performance tuning, scaling architecture, complex debugging, optimization patterns
- Out of Scope: Infrastructure provisioning (use ops-manager), completely new features (use architect + pipeline-engineer), ML optimization (use ML skills)

**Governance Constraints:**

- All optimizations must be documented and justified
- Cost savings or tradeoffs must be communicated to stakeholders
- Changes must not degrade data reliability or SLAs

---

**Version History:**

- 1.0 (2026-01-24): Initial skill definition for senior-level optimization and scaling

