| name | Data Pipeline Engineering |
| description | Guide for designing, building, and maintaining reliable data pipelines |
| emoji | 🔄 |
| tags | ["etl","pipelines","data-engineering","data-modeling"] |
Data Pipeline Engineering Skill
ETL Pipeline Design Checklist
Extract Phase
Transform Phase
Load Phase
Monitoring & Alerting
Documentation
Data Modeling Patterns
Star Schema
Structure:
- One fact table (center)
- Multiple dimension tables (surrounding)
- Denormalized dimensions
When to use:
- OLAP workloads
- Simple queries
- Fast query performance needed
- Clear fact/dimension separation
Example:
Fact: sales
- sale_id
- date_id (FK)
- product_id (FK)
- customer_id (FK)
- amount
- quantity
Dimensions:
- dim_date (date_id, date, month, year, quarter)
- dim_product (product_id, name, category, price)
- dim_customer (customer_id, name, region, segment)
Snowflake Schema
Structure:
- Normalized dimensions
- Dimension tables reference other dimensions
- More normalized than star schema
When to use:
- Storage optimization needed
- Dimensions have hierarchies
- Dimension updates are frequent
- Acceptable to trade query performance for storage
Example:
Fact: sales
- sale_id
- date_id (FK)
- product_id (FK)
- customer_id (FK)
- amount
Dimensions:
- dim_date (date_id, date, month_id)
- dim_month (month_id, month, quarter_id)
- dim_quarter (quarter_id, quarter, year)
- dim_product (product_id, name, category_id)
- dim_category (category_id, category, department_id)
One Big Table (OBT)
Structure:
- Single denormalized table
- All attributes in one table
- Pre-joined data
When to use:
- Simple analytics queries
- Small to medium datasets
- Query performance critical
- Storage not a concern
Trade-offs:
- ✅ Fast queries
- ✅ Simple structure
- ❌ Storage intensive
- ❌ Update complexity
- ❌ Data redundancy
Data Dictionary Template
Table: [table_name]
Description: [What this table contains]
Schema: [schema_name]
Update Frequency: [How often updated]
Source: [Where data comes from]
Columns:
| Column Name | Data Type | Nullable | Description | Example | Notes |
|---|
| column1 | VARCHAR(255) | No | [Description] | [Example] | [Notes] |
| column2 | INTEGER | Yes | [Description] | [Example] | [Notes] |
Primary Key: [column_name(s)]
Foreign Keys:
- [column] → [table.column]
Indexes:
- [index_name] on [columns]
Business Rules:
Data Quality Checks:
Related Tables:
- [Related table 1]
- [Related table 2]
Pipeline Monitoring Checklist
Freshness Monitoring
Completeness Monitoring
Accuracy Monitoring
Performance Monitoring
Error Monitoring
Migration Playbook Template
Pre-Migration
Planning:
Preparation:
Migration Execution
Steps:
- Pre-Migration Checks: Run validation
- Stop Writes: Stop writes to source (if needed)
- Final Extract: Extract final data
- Transform: Apply transformations
- Load: Load to target
- Validate: Validate loaded data
- Switch Traffic: Switch reads to target
- Monitor: Monitor for issues
Validation:
Post-Migration
Verification:
Cleanup:
Rollback Plan
If Migration Fails:
- Stop Migration: Stop migration process
- Restore Source: Restore source if needed
- Notify Stakeholders: Alert stakeholders
- Investigate: Investigate failure cause
- Fix Issues: Fix identified issues
- Retry: Retry migration (if appropriate)
Best Practices
Idempotency
- Design pipelines to be idempotent
- Can safely re-run without side effects
- Use upsert patterns where appropriate
Incremental Processing
- Process only new/changed data when possible
- Use change data capture (CDC) if available
- Track last processed timestamp
Error Handling
- Fail fast on critical errors
- Retry transient failures
- Log all errors with context
- Alert on persistent failures
Testing
- Test with sample data first
- Validate transformations
- Test error scenarios
- Performance test at scale
Documentation
- Document data lineage
- Keep data dictionary updated
- Document business rules
- Maintain runbooks