LearnCen Docs
Guides 8 min read v4

Data Engineering Environment

Enterprise data engineering lab with PySpark, DuckDB, Apache Airflow, dbt, Delta Lake, Apache Superset, MinIO (S3-compatible), Redpanda (Kafka-compatible), and 20 guided exercises covering the full data engineering lifecycle.

Who Is This For

Audience Use Case
College students (final year / data specialization) Learn modern data stack hands-on
Bootcamp graduates Build portfolio-ready data pipeline skills
Junior/Mid data engineers Practice production patterns
Corporate teams Standardized training across teams
Interview candidates Prepare for data engineering interviews

Prerequisites: Basic Python, basic SQL, comfort with terminal/CLI.

Not for: Complete beginners who haven't written code before. Start with Python fundamentals first.

Architecture Overview

┌─────────────────────────────────────────────────────────────────────────┐
│                    Data Engineering Stack                                 │
├─────────────────────────────────────────────────────────────────────────┤
│  Processing        │  Storage            │  Orchestration & BI           │
│  ─────────────     │  ────────────       │  ─────────────────           │
│  PySpark 4.1       │  MinIO (S3)         │  Apache Airflow              │
│  DuckDB            │  Delta Lake         │  Apache Superset             │
│  Polars            │  Parquet/CSV        │  Jupyter Lab                 │
│  pandas            │  DuckDB (OLAP)      │  dbt-core                    │
│                    │  Redpanda (Kafka)    │  Great Expectations          │
├─────────────────────────────────────────────────────────────────────────┤
│  CLI Framework: data-help | data-stack-up | data-demo | data-run        │
└─────────────────────────────────────────────────────────────────────────┘

What's Inside

Core Tools

Tool Purpose
PySpark 4.1 Distributed data processing (local mode)
DuckDB Analytical SQL engine (OLAP)
Apache Airflow Pipeline orchestration (DAGs)
dbt-core + dbt-duckdb SQL-based data transformations (ELT)
Delta Lake Open table format (ACID transactions on Parquet)
Great Expectations Data quality validation
pandas / Polars / PyArrow DataFrame libraries
Jupyter Lab Interactive notebooks

Infrastructure Services

Service Port Purpose
MinIO (S3) 9000 (API), 9001 (Console) S3-compatible object storage
Redpanda (Kafka) 9092 Kafka-compatible event streaming
Apache Superset 8088 BI dashboards & SQL Lab
Airflow 8081 (opt-in) DAG scheduler & webserver
Jupyter Lab 8888 Notebooks
Code-Server 8080 VS Code in browser

Additional Tools

Tool Purpose
SQLFluff SQL linter and formatter
confluent-kafka Python Kafka client
PyIceberg Apache Iceberg table format
boto3 AWS S3 SDK (works with MinIO)
mc (MinIO Client) S3 CLI (mirrors aws s3)
rpk (Redpanda) Kafka CLI
csvkit / jq / yq CLI data processing tools
OpenCode AI coding assistant

Quick Start

# Start infrastructure services (MinIO + Redpanda + Superset)
data-stack-up

# Run end-to-end demo pipeline (validates everything works)
data-demo

# List all exercises
data-run

# View an exercise guide
data-run 01

# Run the exercise script (live execution with colored output)
data-run --exec 01

# Show all available commands
data-help

CLI Framework

Stack Management

Command What it does
data-stack-up Start MinIO + Redpanda + Superset, create data lake buckets, seed sample data
data-stack-up --airflow Also start Airflow (port 8081)
data-stack-down Stop all background services
data-status Display health status of all services

Pipeline & Demo

Command What it does
data-demo Run full end-to-end pipeline (10 stages)
data-demo --verbose Same with detailed output per stage
data-pipeline Run sample ETL pipeline
data-run etl Run PySpark ETL pipeline
data-run delta Run Delta Lake pipeline

Interactive Tools

Command What it does
data-spark PySpark interactive shell (local mode)
data-sql [file] DuckDB SQL shell
data-jupyter Start Jupyter Lab (port 8888)
data-airflow Start Airflow standalone (port 8081)

Exercises & Learning

Command What it does
data-run List all 20 exercises with completion status
data-run 01 Display exercise 01 guide (markdown)
data-run --exec 01 Run exercise 01 Python script (live output)
data-run --list Show exercises grouped by category
data-run 12 Display exercise 12 (Cloud Storage with MinIO)
data-check Validate tool installations

Data Operations

Command What it does
data-test Run data quality tests on sample datasets
data-quality Run Great Expectations validation
data-dbt [init] Run dbt models or initialize a project
data-init <name> Scaffold a new data project
data-clean Clean generated output files
data-reset Reset workspace to clean state

Cloud Integration

Command What it does
data-connect Configure cloud credentials
data-fabric Microsoft Fabric integration commands
fabric-* Full suite of Fabric CLI commands

Services & Credentials

MinIO (S3-compatible Storage)

Field Value
API Endpoint http://localhost:9000
Console Port 9001 (see preview URL)
Access Key minioadmin
Secret Key minioadmin

Pre-created buckets: data-lake, raw-zone, staging-zone, curated-zone Sample data pre-loaded in raw-zone/sales/, raw-zone/customers/, raw-zone/products/

Apache Superset

Field Value
URL Port 8088 (see preview URL)
Username admin
Password learncen

Pre-configured: DuckDB database connection, sample datasets (sales, sales_by_category, sales_by_region)

Redpanda (Kafka-compatible)

Field Value
Broker localhost:9092
Admin API localhost:9644

Exercises (20 total)

Learning Path

Exercises are organized into three tiers. Start where your skill level matches:

Beginner (no services needed): 01, 05, 06, 07, 13, 16

  • SQL fundamentals, data quality, Polars, Parquet, profiling, validation
  • Pure Python — runs without data-stack-up

Intermediate (local services): 00, 02, 03, 04, 08, 09, 11

  • PySpark ETL, Airflow DAGs, dbt models, Delta Lake, Superset dashboards
  • Needs data-stack-up for some exercises

Advanced (full stack): 10, 12, 14, 15, 17, 18, 19

  • MinIO ingestion, Kafka streaming, lakehouse, catalog/lineage, end-to-end
  • Requires data-stack-up for MinIO and Redpanda

Exercise List

# Exercise Skills Tier
00 Spark Memory Tips Performance optimization Intermediate
01 SQL Fundamentals DuckDB, JOINs, GROUP BY, window functions Beginner
02 PySpark Transformations Distributed ETL, DataFrames Intermediate
03 Airflow DAGs Pipeline orchestration, scheduling Intermediate
04 dbt Models SQL-based ELT, staging + marts Intermediate
05 Data Quality Great Expectations, validation rules Beginner
06 Polars Performance High-performance DataFrames Beginner
07 Parquet Analytics Columnar storage, partitioning Beginner
08 CI/CD Pipelines DevOps for data Intermediate
09 Delta Lake ACID tables, time travel Intermediate
10 Fabric Integration Microsoft cloud data platform Advanced
11 Superset Dashboards BI charts, SQL Lab, dashboards Intermediate
12 Cloud Storage (MinIO) S3 API, boto3, data lake zones Advanced
13 Data Profiling & Quality Statistical profiling, rules Beginner
14 Streaming Pipeline Redpanda/Kafka, real-time Advanced
15 Data Lakehouse Delta Lake on MinIO, Spark SQL Advanced
16 Schema Validation Data contracts, JSON Schema Beginner
17 Catalog & Lineage Data governance Advanced
18 Synthetic Data & Benchmarking Test data generation, perf testing Advanced
19 End-to-End Pipeline Capstone: full production pipeline Advanced

Running Exercises

Each exercise has two modes:

# View the exercise guide (instructions + code snippets)
data-run 01

# Execute the reference implementation (live output)
data-run --exec 01

The --exec mode runs a Python script that demonstrates the exercise concepts with real data processing, colored output, step-by-step progress, and timing information.

Data Demo Pipeline (data-demo)

Runs 10 stages to validate the entire stack:

┌─────────────────────────────────────────────────┐
│ 1. Generate sample data        → output/data/   │
│ 2. PySpark ETL                 → output/etl/    │
│ 3. Delta Lake tables           → output/delta/  │
│ 4. DuckDB analytics            → output/analytics/ │
│ 5. dbt transforms              → dbt models     │
│ 6. Data quality validation     → pass/fail      │
│ 7. Airflow registration        → DAG list       │
│ 8. OneLake upload (optional)   → cloud sync     │
│ 9. Superset dashboard setup    → superset init  │
│ 10. Execution report           → output/reports/ │
└─────────────────────────────────────────────────┘

Project Structure

workspace/
├── datasets/                    # Sample CSV datasets (pre-loaded)
│   ├── sales_transactions.csv   # 102 rows
│   ├── customers.csv            # 101 rows
│   └── products.csv             # 102 rows
├── exercises/                   # 20 guided exercises (markdown)
├── scripts/                     # 20 runnable Python exercise scripts
│   ├── common/                  # Shared utilities (paths, output, checks)
│   ├── exercise_01_sql_fundamentals.py
│   ├── exercise_02_spark_transforms.py
│   ├── ...
│   ├── exercise_19_end_to_end.py
│   └── registry.json            # Exercise metadata & categories
├── pipelines/                   # ETL scripts (sample_etl.py, etl_spark.py, create_delta.py)
├── samples/                     # Enterprise sample projects
│   ├── dbt-project/             # dbt with DuckDB
│   ├── data-quality-suite/      # Great Expectations
│   └── fabric-lakehouse/        # Microsoft Fabric integration
├── output/                      # Pipeline output (generated by exercises)
│   ├── exercise_01/             # Per-exercise output artifacts
│   ├── exercise_02/
│   └── ...
├── .env.dev                     # Dev environment config
├── .env.staging                 # Staging environment config
├── .env.production              # Production environment config
├── .sqlfluff                    # SQL linter config
├── Mastery.md                   # Learning guide & standards
└── README.md                    # Quick reference

Virtual Environments

Venv Path Purpose
Main /opt/learncen-venv PySpark, DuckDB, Airflow, dbt, pandas, etc.
Superset /opt/superset-venv Apache Superset (isolated due to dependency conflicts)

Cloud Storage Pattern (MinIO as S3)

MinIO mimics AWS S3 / Azure Blob / GCP Cloud Storage locally:

# Same as `aws s3` commands
mc ls local/                     # List buckets
mc cp file local/raw-zone/       # Upload to S3
mc ls local/raw-zone/ --recursive

# Python (boto3) — identical to real AWS S3
import boto3
s3 = boto3.client("s3", endpoint_url="http://localhost:9000",
    aws_access_key_id="minioadmin", aws_secret_access_key="minioadmin")

# PySpark reads from S3
spark.read.csv("s3a://raw-zone/sales/sales_transactions.csv")

# DuckDB reads from S3
SELECT * FROM read_csv_auto('s3://raw-zone/sales/sales_transactions.csv');

Enterprise Mapping

Local Tool Cloud Equivalent
MinIO AWS S3 / Azure ADLS / GCP GCS
Redpanda AWS MSK / Azure Event Hubs / Confluent Kafka
DuckDB Snowflake / BigQuery / Synapse
Superset Power BI / Looker / Tableau
Airflow AWS MWAA / GCP Cloud Composer / Azure Data Factory
dbt dbt Cloud
Delta Lake Databricks / Microsoft Fabric Lakehouse
PySpark Databricks / EMR / Synapse Spark

Security

  • Root access restricted to: apt, apt-get, pip, python3
  • Python packages: use pip install <pkg> (no sudo needed, venv is writable)
  • System packages: use sudo apt install <pkg>
  • Superset runs in isolated venv (/opt/superset-venv)

Ports Exposed

Port Service
8080 Code-Server (VS Code)
8081 Apache Airflow
8088 Apache Superset
8888 Jupyter Lab
9000 MinIO S3 API
9001 MinIO Console
9092 Redpanda (Kafka)
9323 Report server (data-open-report)

VS Code Extensions (Pre-installed)

Extension Purpose
Python Language support + debugging
Jupyter Notebook support
SQLite Viewer Browse SQLite/DuckDB databases

Tips

  • data-stack-up seeds MinIO with sample data — you can query it via boto3, PySpark, or DuckDB immediately
  • data-demo --verbose shows full error output for any failing stages
  • DuckDB queries CSV/Parquet/JSON directly without loading: SELECT * FROM read_csv_auto('file.csv')
  • Use Polars instead of pandas for datasets > 1M rows
  • Airflow DAGs auto-discover from ~/airflow/dags/ — just save a .py file
  • data-run with no args shows exercise completion progress
  • Type opencode for AI-powered coding assistance