[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BY97VD0W4EAN9AYFPYMJWS":3,"skill-same:01M7BY97VD0W4EAN9AYFPYMJWS":161},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":86,"commitSha":87,"skillDirectory":88,"forksCount":89,"repositoryHtmlUrl":90,"repositoryHomepageUrl":6,"ownerHtmlUrl":91,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":92,"install":93,"resources":105},"01M7BY97VD0W4EAN9AYFPYMJWS","senior-data-engineer",null,"World-class data engineering skill for building scalable data pipelines, ETL\u002FELT systems, real-time streaming, and data infrastructure. Expertise in Python, SQL, Spark, Airflow, dbt, Kafka, Flink, Kinesis, and modern data stack. Includes data modeling, pipeline orchestration, data quality, streaming quality monitoring, and DataOps. Use when designing data architectures, building batch or streaming data pipelines, optimizing data workflows, or implementing data governance.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"MIT","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\n\n# === CORE IDENTITY ===\nname: senior-data-engineer\ntitle: Senior Data Engineer Skill Package\ndescription: World-class data engineering skill for building scalable data pipelines, ETL\u002FELT systems, real-time streaming, and data infrastructure. Expertise in Python, SQL, Spark, Airflow, dbt, Kafka, Flink, Kinesis, and modern data stack. Includes data modeling, pipeline orchestration, data quality, streaming quality monitoring, and DataOps. Use when designing data architectures, building batch or streaming data pipelines, optimizing data workflows, or implementing data governance.\ndomain: engineering\nsubdomain: data-engineering\n\n# === WEBSITE DISPLAY ===\ndifficulty: advanced\ntime-saved: \"TODO: Quantify time savings\"\nfrequency: \"TODO: Estimate usage frequency\"\nuse-cases:\n  - Designing data pipelines for ETL\u002FELT processes\n  - Building data warehouses and data lakes\n  - Implementing data quality and governance frameworks\n  - Creating analytics dashboards and reporting\n  - Building real-time streaming pipelines with Kafka and Flink\n  - Implementing exactly-once streaming semantics\n  - Monitoring streaming quality (consumer lag, data freshness, schema drift)\n  - Implementing Flink Java DataStream jobs with session\u002Ftumbling windows\n\n# === RELATIONSHIPS ===\nrelated-agents: []\nrelated-skills: []\nrelated-commands: []\norchestrated-by: []\n\n# === TECHNICAL ===\ndependencies:\n  scripts: []\n  references: []\n  assets: []\ncompatibility: \"Python 3.8+; platforms: macos, linux, windows\"\ntech-stack:\n  - Python\n  - SQL\n  - Apache Spark\n  - Airflow\n  - dbt\n  - Apache Kafka\n  - Apache Flink\n  - AWS Kinesis\n  - Spark Structured Streaming\n  - Kafka Streams\n  - PostgreSQL\n  - BigQuery\n  - Snowflake\n  - Docker\n  - Schema Registry\n\n# === EXAMPLES ===\nexamples:\n  -\n    title: Example Usage\n    input: \"TODO: Add example input for senior-data-engineer\"\n    output: \"TODO: Add expected output\"\n\n# === ANALYTICS ===\nstats:\n  downloads: 0\n  stars: 0\n  rating: 0.0\n  reviews: 0\n\n# === VERSIONING ===\nversion: v2.1.0\nauthor: Claude Skills Team\ncontributors: []\ncreated: 2025-10-20\nupdated: 2025-12-16\nlicense: MIT\n\n# === DISCOVERABILITY ===\ntags: [architecture, data, design, engineer, engineering, senior, streaming, kafka, flink, real-time]\nfeatured: false\nverified: true\n---\n# Senior Data Engineer\n\n## Core Capabilities\n\n- **Batch Pipeline Orchestration** - Airflow-based ETL\u002FELT pipelines with retries, dependency resolution, and monitoring.\n- **Real-Time Streaming** - Kafka \u002F Flink \u002F Kinesis \u002F Spark Structured Streaming pipelines with exactly-once semantics.\n- **Flink Java DataStream Jobs** - Session\u002Ftumbling\u002Fsliding windows, keyed state, event-time processing, custom sources\u002Fsinks over compressed CSV.\n- **Data Quality Management** - Multi-dimensional validation with independent cross-checks.\n- **Performance Optimization** - Query, Spark, and pipeline tuning.\n\n## CRITICAL: Flink Query Implementation Checklist\n\nWhen implementing a Flink job that will be graded by comparing its output against a reference (common in benchmark tasks like Google cluster-trace queries), follow this checklist BEFORE reporting completion. Skipping any step has historically produced wrong-but-plausible output.\n\n### Step 1 — Extract every semantic constant from the task text\n\nFor each numeric or categorical parameter, write down:\n\n| Question | Where to look |\n|---|---|\n| Timestamp unit in the raw data? (s \u002F ms \u002F µs \u002F ns) | Task text + `format.pdf` schema |\n| Timestamp unit Flink expects for watermarks\u002Fsession gaps? | Flink API: **milliseconds** |\n| Which event-type integers count as \"submit\" \u002F \"finish\" \u002F \"fail\" \u002F \"kill\" \u002F \"evict\" \u002F \"schedule\" \u002F \"lost\"? | `format.pdf` event-type enum table |\n| Which of those count as *terminal* for \"job has finished\"? | Task text — read the exact wording; usually FINISH only, sometimes FINISH+FAIL+KILL |\n| Gap boundary: is the session split when gap `> T` or `>= T`? | Task text — \"inactivity period of 10 minutes\" is normally strict `>` (i.e., two events exactly T apart stay in the same session) |\n| Does a resubmit \u002F evict-then-submit count as one or two SUBMITs? | Task text — usually two |\n| Should jobs with no terminal event be emitted? | Task text — usually **no** |\n| Are duplicate `(job_id, task_index, event_time)` rows kept or deduplicated? | Task text — usually kept |\n| Output format exactly? | Task text — `(a,b)` with no spaces, integer types |\n\nEncode each answer as a named constant at the top of your Flink source.\n\n### Step 2 — Prefer an explicit sort+scan for session-gap logic over `EventTimeSessionWindows` when the grader is strict\n\n`EventTimeSessionWindows.withGap(Time.seconds(T))` in Flink merges two events whose event-time distance is strictly less than `T` and splits when distance is `>= T`. Task specifications frequently mean the opposite (\"a stage ends when there is an inactivity period of T minutes\" → split when gap `> T`, keep together when gap `\u003C= T`). This one-tick boundary difference is invisible in most spot checks but can misclassify hundreds of sessions when many events land on exact round timestamps.\n\nRecommended pattern for exact-match graders:\n\n```java\n\u002F\u002F After keyBy(jobId), collect all SUBMIT event-time-micros into a KeyedProcessFunction's\n\u002F\u002F ListState, register an end-of-time timer, then in onTimer:\n\u002F\u002F   Sort ascending, scan once, split whenever (t[i] - t[i-1]) > GAP.\n\u002F\u002F Emit max run length for that job.\n```\n\nThis makes the boundary convention (`>` vs `>=`) explicit and auditable, and it avoids Flink's implicit window-merge semantics.\n\nIf you do use `EventTimeSessionWindows`, verify the boundary experimentally with a synthetic 3-event input (`t=0, t=T, t=2T`) and confirm the number of resulting windows matches the spec.\n\n### Step 3 — Timestamp unit conversion\n\nGoogle cluster traces store timestamps in **microseconds**. Flink watermarks and window gaps are in **milliseconds**. If you divide µs by 1000 before assigning as the event timestamp, you must also express the gap in milliseconds (`Time.seconds(600)` = 600 000 ms). Never mix. Write a unit-test-style comment near the timestamp assigner recording both units.\n\n### Step 4 — Independent cross-check must NOT reuse your own interpretation\n\nA circular self-check (Python reference that encodes the same misreading as the Flink job) will happily report 0 mismatches while the grader still fails. To break the circularity:\n\n1. Read the task specification twice, once as \"strict `>` gap\" and once as \"non-strict `>=` gap\". Implement both variants in the reference script.\n2. Read the terminal-event set two ways (FINISH-only vs FINISH+FAIL+KILL+LOST). Compute both filtered outputs.\n3. Compare against the Flink output. If any of the 4 combinations matches, you have identified the correct convention; if none matches, look for another axis (unit conversion, deduplication, off-by-one).\n4. Only report success when your Flink output matches at least one of the reference variants AND that variant is the one most directly supported by the task text.\n\n### Step 5 — Sanity checks on the emitted file\n\n- `wc -l output` equals the number of jobs with at least one terminal event AND at least one SUBMIT.\n- Every line matches regex `^\\([0-9]+,[0-9]+\\)$` (no spaces, no trailing commas).\n- No duplicate job IDs.\n- No zero counts (a job with no SUBMITs should not appear).\n- Parallelism-1 file sink used for deterministic single-file output.\n\n## Flink Java DataStream — Session\u002FStage Detection Reference Pattern\n\nSkeleton for the \"longest stage per finished job\" pattern used in Google cluster-trace style tasks. This is illustrative, not a drop-in.\n\n```java\n\u002F\u002F Constants derived from Step 1 of the checklist.\nfinal long GAP_MICROS = 600L * 1_000_000L; \u002F\u002F 10 min in µs; keep native unit for exactness\nfinal Set\u003CInteger> TERMINAL = Set.of(\u002F* per task text — read carefully *\u002F);\nfinal int SUBMIT = 0;\n\n\u002F\u002F Task events keyed by jobId, only SUBMITs kept, timestamps left in µs.\nDataStream\u003CTuple2\u003CLong, Long>> submits = taskEvents\n    .filter(e -> e.eventType == SUBMIT)\n    .map(e -> Tuple2.of(e.jobId, e.timestampMicros))\n    .returns(Types.TUPLE(Types.LONG, Types.LONG));\n\n\u002F\u002F KeyedProcessFunction that buffers all submit-times, then on end-of-input\n\u002F\u002F timer sorts and scans with the boundary convention documented in the task.\nDataStream\u003CTuple2\u003CLong, Integer>> perJobLongest = submits\n    .keyBy(t -> t.f0)\n    .process(new LongestRunFn(GAP_MICROS));  \u002F\u002F split when (curr - prev) > GAP_MICROS\n\n\u002F\u002F Terminal job events → set of finished job IDs.\nDataStream\u003CLong> finished = jobEvents\n    .filter(e -> TERMINAL.contains(e.eventType))\n    .map(e -> e.jobId);\n\n\u002F\u002F Emit only for finished jobs; use a KeyedCoProcessFunction with end-of-time timer.\n\u002F\u002F Write with FileLineSink at parallelism 1.\n```\n\nInside `LongestRunFn.onTimer`:\n\n```java\nList\u003CLong> ts = new ArrayList\u003C>();\nlistState.get().forEach(ts::add);\nif (ts.isEmpty()) return;\nCollections.sort(ts);\nint best = 1, cur = 1;\nfor (int i = 1; i \u003C ts.size(); i++) {\n    if (ts.get(i) - ts.get(i - 1) > GAP_MICROS) {   \u002F\u002F strict > per spec\n        cur = 1;\n    } else {\n        cur++;\n    }\n    if (cur > best) best = cur;\n}\nout.collect(Tuple2.of(ctx.getCurrentKey(), best));\n```\n\nUse `Long.MAX_VALUE - 1` as the end-of-time event-time timer so bounded sources flush cleanly.\n\n## Key Workflows\n\n### Workflow 1: Build ETL Pipeline\n\n1. Design pipeline architecture (Lambda, Kappa, Medallion).\n2. Configure YAML pipeline definition.\n3. Generate Airflow DAG with `pipeline_orchestrator.py`.\n4. Define data quality validation rules.\n5. Deploy and configure monitoring\u002Falerting.\n\n### Workflow 2: Build Real-Time Streaming Pipeline\n\n1. Select streaming architecture (Kappa vs Lambda).\n2. Configure streaming pipeline YAML.\n3. Generate Kafka configurations.\n4. Generate Flink\u002FSpark job scaffolding.\n5. Deploy and monitor.\n\n### Workflow 3: Implement a Flink Query for an Exact-Match Grader (NEW)\n\n1. Read the task text and any linked schema PDF twice; complete the Step 1 checklist above.\n2. Write POJOs for each event type with explicit CSV column indices (comment the format).\n3. Implement a custom gzipped-CSV `SourceFunction` respecting the `AppBase` test-override hooks (`taskSourceOrTest`, `jobSourceOrTest`, `sinkOrTest`).\n4. Prefer explicit sort+scan over Flink session windows for gap semantics (Step 2).\n5. Use a `FileLineSink` at parallelism 1 for deterministic single-file output.\n6. Run the job locally with `mvn dependency:build-classpath` + the shaded jar on classpath.\n7. Execute the two-variant cross-check from Step 4 before reporting done.\n\n## Quick Start\n\n### Pipeline Orchestration\n\n```bash\npython scripts\u002Fpipeline_orchestrator.py --config pipeline_config.yaml --output dags\u002F\npython scripts\u002Fpipeline_orchestrator.py --config pipeline_config.yaml --validate\npython scripts\u002Fpipeline_orchestrator.py --template incremental --output dags\u002F\n```\n\n### Data Quality Validation\n\n```bash\npython scripts\u002Fdata_quality_validator.py --input data\u002Fsales.csv --output report.html\n```\n\n### Real-Time Streaming\n\n```bash\npython scripts\u002Fstream_processor.py --config streaming_config.yaml --validate\npython scripts\u002Fkafka_config_generator.py --topic user-events --partitions 12 --replication 3 --output kafka\u002Ftopics\u002F\npython scripts\u002Fstream_processor.py --config streaming_config.yaml --mode flink --generate --output flink-jobs\u002F\npython scripts\u002Fstreaming_quality_validator.py --lag --consumer-group events-processor --threshold 10000\n```\n\n## Core Workflows\n\nSee also references for detailed patterns:\n- **Frameworks:** [references\u002Fframeworks.md](references\u002Fframeworks.md)\n- **Templates:** [references\u002Ftemplates.md](references\u002Ftemplates.md)\n- **Tools:** [references\u002Ftools.md](references\u002Ftools.md)\n\n## Python Tools\n\n- `pipeline_orchestrator.py` — Airflow DAG generation.\n- `data_quality_validator.py` — Multi-dimensional data quality checks.\n- `etl_performance_optimizer.py` — Pipeline profiling and recommendations.\n- `stream_processor.py` — Streaming pipeline configuration + scaffolding.\n- `streaming_quality_validator.py` — Consumer lag, freshness, schema-drift monitoring.\n- `kafka_config_generator.py` — Topic\u002Fproducer\u002Fconsumer\u002FStreams\u002FConnect configs.\n\nFull docs in [references\u002Ftools.md](references\u002Ftools.md).\n\n## Tech Stack\n\n- **Languages:** Python 3.8+, SQL, Scala (Spark), Java (Flink)\n- **Orchestration:** Apache Airflow, Prefect, Dagster\n- **Batch Processing:** Apache Spark, dbt, Pandas\n- **Stream Processing:** Apache Kafka, Apache Flink, Kafka Streams, Spark Structured Streaming, AWS Kinesis\n- **Storage:** PostgreSQL, BigQuery, Snowflake, Redshift, S3, GCS\n- **Schema Management:** Confluent Schema Registry, AWS Glue Schema Registry\n- **Containerization:** Docker, Kubernetes\n- **Monitoring:** Datadog, Prometheus, Grafana, Kafka UI\n\n## Best Practices\n\n**Pipeline Design:**\n1. Idempotent operations for safe reruns.\n2. Incremental processing where possible.\n3. Clear data lineage and documentation.\n4. Comprehensive error handling.\n5. Automated recovery mechanisms.\n\n**Data Quality (Exact-Match Graders):**\n1. Define quality rules early.\n2. Validate at every pipeline stage.\n3. NEVER treat a self-implemented reference as ground truth without varying its ambiguous conventions (see Step 4 above).\n4. Track quality trends over time.\n5. Block bad data from downstream.\n\n**Performance:**\n1. Partition large tables by date\u002Fregion.\n2. Use columnar formats (Parquet, ORC).\n3. Leverage predicate pushdown.\n4. Optimize for your query patterns.\n5. Monitor and tune regularly.\n\n**Operations:**\n1. Version control everything.\n2. Automate testing and deployment.\n3. Comprehensive monitoring.\n4. Runbooks for incidents.\n5. Regular performance reviews.\n\n## Performance Targets\n\n**Batch Pipeline Execution:** P50 \u003C 5 min, P95 \u003C 15 min, success > 99%, freshness \u003C 1 h.\n**Streaming Pipeline Execution:** > 10K events\u002Fs, P99 end-to-end \u003C 1 s, lag \u003C 10K, exactly-once.\n**Data Quality (Batch):** score > 95%, completeness > 99%, timeliness \u003C 2 h.\n**Streaming Quality:** freshness P95 \u003C 5 min, late-data \u003C 5%, DLQ \u003C 1%, 100% schema-compatible changes.\n**Cost Efficiency:** \u003C $0.10\u002FGB, stable or decreasing cloud cost, > 70% utilization.\n\n## Resources\n\n- **Frameworks Guide:** [references\u002Fframeworks.md](references\u002Fframeworks.md)\n- **Code Templates:** [references\u002Ftemplates.md](references\u002Ftemplates.md)\n- **Tool Documentation:** [references\u002Ftools.md](references\u002Ftools.md)\n- **Python Scripts:** `scripts\u002F` directory\n\n---\n\n**Version:** 2.1.0\n**Last Updated:** December 16, 2025\n**Streaming Enhancement:** Added Flink exact-match grader checklist and session-gap reference pattern.\n","# Senior Data Engineer\n\n## Core Capabilities\n\n- **Batch Pipeline Orchestration** - Airflow-based ETL\u002FELT pipelines with retries, dependency resolution, and monitoring.\n- **Real-Time Streaming** - Kafka \u002F Flink \u002F Kinesis \u002F Spark Structured Streaming pipelines with exactly-once semantics.\n- **Flink Java DataStream Jobs** - Session\u002Ftumbling\u002Fsliding windows, keyed state, event-time processing, custom sources\u002Fsinks over compressed CSV.\n- **Data Quality Management** - Multi-dimensional validation with independent cross-checks.\n- **Performance Optimization** - Query, Spark, and pipeline tuning.\n\n## CRITICAL: Flink Query Implementation Checklist\n\nWhen implementing a Flink job that will be graded by comparing its output against a reference (common in benchmark tasks like Google cluster-trace queries), follow this checklist BEFORE reporting completion. Skipping any step has historically produced wrong-but-plausible output.\n\n### Step 1 — Extract every semantic constant from the task text\n\nFor each numeric or categorical parameter, write down:\n\n| Question | Where to look |\n|---|---|\n| Timestamp unit in the raw data? (s \u002F ms \u002F µs \u002F ns) | Task text + `format.pdf` schema |\n| Timestamp unit Flink expects for watermarks\u002Fsession gaps? | Flink API: **milliseconds** |\n| Which event-type integers count as \"submit\" \u002F \"finish\" \u002F \"fail\" \u002F \"kill\" \u002F \"evict\" \u002F \"schedule\" \u002F \"lost\"? | `format.pdf` event-type enum table |\n| Which of those count as *terminal* for \"job has finished\"? | Task text — read the exact wording; usually FINISH only, sometimes FINISH+FAIL+KILL |\n| Gap boundary: is the session split when gap `> T` or `>= T`? | Task text — \"inactivity period of 10 minutes\" is normally strict `>` (i.e., two events exactly T apart stay in the same session) |\n| Does a resubmit \u002F evict-then-submit count as one or two SUBMITs? | Task text — usually two |\n| Should jobs with no terminal event be emitted? | Task text — usually **no** |\n| Are duplicate `(job_id, task_index, event_time)` rows kept or deduplicated? | Task text — usually kept |\n| Output format exactly? | Task text — `(a,b)` with no spaces, integer types |\n\nEncode each answer as a named constant at the top of your Flink source.\n\n### Step 2 — Prefer an explicit sort+scan for session-gap logic over `EventTimeSessionWindows` when the grader is strict\n\n`EventTimeSessionWindows.withGap(Time.seconds(T))` in Flink merges two events whose event-time distance is strictly less than `T` and splits when distance is `>= T`. Task specifications frequently mean the opposite (\"a stage ends when there is an inactivity period of T minutes\" → split when gap `> T`, keep together when gap `\u003C= T`). This one-tick boundary difference is invisible in most spot checks but can misclassify hundreds of sessions when many events land on exact round timestamps.\n\nRecommended pattern for exact-match graders:\n\n```java\n\u002F\u002F After keyBy(jobId), collect all SUBMIT event-time-micros into a KeyedProcessFunction's\n\u002F\u002F ListState, register an end-of-time timer, then in onTimer:\n\u002F\u002F   Sort ascending, scan once, split whenever (t[i] - t[i-1]) > GAP.\n\u002F\u002F Emit max run length for that job.\n```\n\nThis makes the boundary convention (`>` vs `>=`) explicit and auditable, and it avoids Flink's implicit window-merge semantics.\n\nIf you do use `EventTimeSessionWindows`, verify the boundary experimentally with a synthetic 3-event input (`t=0, t=T, t=2T`) and confirm the number of resulting windows matches the spec.\n\n### Step 3 — Timestamp unit conversion\n\nGoogle cluster traces store timestamps in **microseconds**. Flink watermarks and window gaps are in **milliseconds**. If you divide µs by 1000 before assigning as the event timestamp, you must also express the gap in milliseconds (`Time.seconds(600)` = 600 000 ms). Never mix. Write a unit-test-style comment near the timestamp assigner recording both units.\n\n### Step 4 — Independent cross-check must NOT reuse your own interpretation\n\nA circular self-check (Python reference that encodes the same misreading as the Flink job) will happily report 0 mismatches while the grader still fails. To break the circularity:\n\n1. Read the task specification twice, once as \"strict `>` gap\" and once as \"non-strict `>=` gap\". Implement both variants in the reference script.\n2. Read the terminal-event set two ways (FINISH-only vs FINISH+FAIL+KILL+LOST). Compute both filtered outputs.\n3. Compare against the Flink output. If any of the 4 combinations matches, you have identified the correct convention; if none matches, look for another axis (unit conversion, deduplication, off-by-one).\n4. Only report success when your Flink output matches at least one of the reference variants AND that variant is the one most directly supported by the task text.\n\n### Step 5 — Sanity checks on the emitted file\n\n- `wc -l output` equals the number of jobs with at least one terminal event AND at least one SUBMIT.\n- Every line matches regex `^\\([0-9]+,[0-9]+\\)$` (no spaces, no trailing commas).\n- No duplicate job IDs.\n- No zero counts (a job with no SUBMITs should not appear).\n- Parallelism-1 file sink used for deterministic single-file output.\n\n## Flink Java DataStream — Session\u002FStage Detection Reference Pattern\n\nSkeleton for the \"longest stage per finished job\" pattern used in Google cluster-trace style tasks. This is illustrative, not a drop-in.\n\n```java\n\u002F\u002F Constants derived from Step 1 of the checklist.\nfinal long GAP_MICROS = 600L * 1_000_000L; \u002F\u002F 10 min in µs; keep native unit for exactness\nfinal Set\u003CInteger> TERMINAL = Set.of(\u002F* per task text — read carefully *\u002F);\nfinal int SUBMIT = 0;\n\n\u002F\u002F Task events keyed by jobId, only SUBMITs kept, timestamps left in µs.\nDataStream\u003CTuple2\u003CLong, Long>> submits = taskEvents\n    .filter(e -> e.eventType == SUBMIT)\n    .map(e -> Tuple2.of(e.jobId, e.timestampMicros))\n    .returns(Types.TUPLE(Types.LONG, Types.LONG));\n\n\u002F\u002F KeyedProcessFunction that buffers all submit-times, then on end-of-input\n\u002F\u002F timer sorts and scans with the boundary convention documented in the task.\nDataStream\u003CTuple2\u003CLong, Integer>> perJobLongest = submits\n    .keyBy(t -> t.f0)\n    .process(new LongestRunFn(GAP_MICROS));  \u002F\u002F split when (curr - prev) > GAP_MICROS\n\n\u002F\u002F Terminal job events → set of finished job IDs.\nDataStream\u003CLong> finished = jobEvents\n    .filter(e -> TERMINAL.contains(e.eventType))\n    .map(e -> e.jobId);\n\n\u002F\u002F Emit only for finished jobs; use a KeyedCoProcessFunction with end-of-time timer.\n\u002F\u002F Write with FileLineSink at parallelism 1.\n```\n\nInside `LongestRunFn.onTimer`:\n\n```java\nList\u003CLong> ts = new ArrayList\u003C>();\nlistState.get().forEach(ts::add);\nif (ts.isEmpty()) return;\nCollections.sort(ts);\nint best = 1, cur = 1;\nfor (int i = 1; i \u003C ts.size(); i++) {\n    if (ts.get(i) - ts.get(i - 1) > GAP_MICROS) {   \u002F\u002F strict > per spec\n        cur = 1;\n    } else {\n        cur++;\n    }\n    if (cur > best) best = cur;\n}\nout.collect(Tuple2.of(ctx.getCurrentKey(), best));\n```\n\nUse `Long.MAX_VALUE - 1` as the end-of-time event-time timer so bounded sources flush cleanly.\n\n## Key Workflows\n\n### Workflow 1: Build ETL Pipeline\n\n1. Design pipeline architecture (Lambda, Kappa, Medallion).\n2. Configure YAML pipeline definition.\n3. Generate Airflow DAG with `pipeline_orchestrator.py`.\n4. Define data quality validation rules.\n5. Deploy and configure monitoring\u002Falerting.\n\n### Workflow 2: Build Real-Time Streaming Pipeline\n\n1. Select streaming architecture (Kappa vs Lambda).\n2. Configure streaming pipeline YAML.\n3. Generate Kafka configurations.\n4. Generate Flink\u002FSpark job scaffolding.\n5. Deploy and monitor.\n\n### Workflow 3: Implement a Flink Query for an Exact-Match Grader (NEW)\n\n1. Read the task text and any linked schema PDF twice; complete the Step 1 checklist above.\n2. Write POJOs for each event type with explicit CSV column indices (comment the format).\n3. Implement a custom gzipped-CSV `SourceFunction` respecting the `AppBase` test-override hooks (`taskSourceOrTest`, `jobSourceOrTest`, `sinkOrTest`).\n4. Prefer explicit sort+scan over Flink session windows for gap semantics (Step 2).\n5. Use a `FileLineSink` at parallelism 1 for deterministic single-file output.\n6. Run the job locally with `mvn dependency:build-classpath` + the shaded jar on classpath.\n7. Execute the two-variant cross-check from Step 4 before reporting done.\n\n## Quick Start\n\n### Pipeline Orchestration\n\n```bash\npython scripts\u002Fpipeline_orchestrator.py --config pipeline_config.yaml --output dags\u002F\npython scripts\u002Fpipeline_orchestrator.py --config pipeline_config.yaml --validate\npython scripts\u002Fpipeline_orchestrator.py --template incremental --output dags\u002F\n```\n\n### Data Quality Validation\n\n```bash\npython scripts\u002Fdata_quality_validator.py --input data\u002Fsales.csv --output report.html\n```\n\n### Real-Time Streaming\n\n```bash\npython scripts\u002Fstream_processor.py --config streaming_config.yaml --validate\npython scripts\u002Fkafka_config_generator.py --topic user-events --partitions 12 --replication 3 --output kafka\u002Ftopics\u002F\npython scripts\u002Fstream_processor.py --config streaming_config.yaml --mode flink --generate --output flink-jobs\u002F\npython scripts\u002Fstreaming_quality_validator.py --lag --consumer-group events-processor --threshold 10000\n```\n\n## Core Workflows\n\nSee also references for detailed patterns:\n- **Frameworks:** [references\u002Fframeworks.md](references\u002Fframeworks.md)\n- **Templates:** [references\u002Ftemplates.md](references\u002Ftemplates.md)\n- **Tools:** [references\u002Ftools.md](references\u002Ftools.md)\n\n## Python Tools\n\n- `pipeline_orchestrator.py` — Airflow DAG generation.\n- `data_quality_validator.py` — Multi-dimensional data quality checks.\n- `etl_performance_optimizer.py` — Pipeline profiling and recommendations.\n- `stream_processor.py` — Streaming pipeline configuration + scaffolding.\n- `streaming_quality_validator.py` — Consumer lag, freshness, schema-drift monitoring.\n- `kafka_config_generator.py` — Topic\u002Fproducer\u002Fconsumer\u002FStreams\u002FConnect configs.\n\nFull docs in [references\u002Ftools.md](references\u002Ftools.md).\n\n## Tech Stack\n\n- **Languages:** Python 3.8+, SQL, Scala (Spark), Java (Flink)\n- **Orchestration:** Apache Airflow, Prefect, Dagster\n- **Batch Processing:** Apache Spark, dbt, Pandas\n- **Stream Processing:** Apache Kafka, Apache Flink, Kafka Streams, Spark Structured Streaming, AWS Kinesis\n- **Storage:** PostgreSQL, BigQuery, Snowflake, Redshift, S3, GCS\n- **Schema Management:** Confluent Schema Registry, AWS Glue Schema Registry\n- **Containerization:** Docker, Kubernetes\n- **Monitoring:** Datadog, Prometheus, Grafana, Kafka UI\n\n## Best Practices\n\n**Pipeline Design:**\n1. Idempotent operations for safe reruns.\n2. Incremental processing where possible.\n3. Clear data lineage and documentation.\n4. Comprehensive error handling.\n5. Automated recovery mechanisms.\n\n**Data Quality (Exact-Match Graders):**\n1. Define quality rules early.\n2. Validate at every pipeline stage.\n3. NEVER treat a self-implemented reference as ground truth without varying its ambiguous conventions (see Step 4 above).\n4. Track quality trends over time.\n5. Block bad data from downstream.\n\n**Performance:**\n1. Partition large tables by date\u002Fregion.\n2. Use columnar formats (Parquet, ORC).\n3. Leverage predicate pushdown.\n4. Optimize for your query patterns.\n5. Monitor and tune regularly.\n\n**Operations:**\n1. Version control everything.\n2. Automate testing and deployment.\n3. Comprehensive monitoring.\n4. Runbooks for incidents.\n5. Regular performance reviews.\n\n## Performance Targets\n\n**Batch Pipeline Execution:** P50 \u003C 5 min, P95 \u003C 15 min, success > 99%, freshness \u003C 1 h.\n**Streaming Pipeline Execution:** > 10K events\u002Fs, P99 end-to-end \u003C 1 s, lag \u003C 10K, exactly-once.\n**Data Quality (Batch):** score > 95%, completeness > 99%, timeliness \u003C 2 h.\n**Streaming Quality:** freshness P95 \u003C 5 min, late-data \u003C 5%, DLQ \u003C 1%, 100% schema-compatible changes.\n**Cost Efficiency:** \u003C $0.10\u002FGB, stable or decreasing cloud cost, > 70% utilization.\n\n## Resources\n\n- **Frameworks Guide:** [references\u002Fframeworks.md](references\u002Fframeworks.md)\n- **Code Templates:** [references\u002Ftemplates.md](references\u002Ftemplates.md)\n- **Tool Documentation:** [references\u002Ftools.md](references\u002Ftools.md)\n- **Python Scripts:** `scripts\u002F` directory\n\n---\n\n**Version:** 2.1.0\n**Last Updated:** December 16, 2025\n**Streaming Enhancement:** Added Flink exact-match grader checklist and session-gap reference pattern.\n",{"name":5,"tags":24,"stats":35,"title":36,"author":37,"domain":29,"created":38,"license":15,"updated":39,"version":40,"examples":41,"featured":20,"verified":46,"frequency":47,"subdomain":48,"use-cases":49,"difficulty":58,"tech-stack":59,"time-saved":75,"description":7,"contributors":76,"dependencies":77,"compatibility":81,"related-agents":82,"related-skills":83,"orchestrated-by":84,"related-commands":85},[25,26,27,28,29,30,31,32,33,34],"architecture","data","design","engineer","engineering","senior","streaming","kafka","flink","real-time",{"stars":14,"rating":14,"reviews":14,"downloads":14},"Senior Data Engineer Skill Package","Claude Skills Team",1760918400000,1765843200000,"v2.1.0",[42],{"input":43,"title":44,"output":45},"TODO: Add example input for senior-data-engineer","Example Usage","TODO: Add expected output",true,"TODO: Estimate usage frequency","data-engineering",[50,51,52,53,54,55,56,57],"Designing data pipelines for ETL\u002FELT processes","Building data warehouses and data lakes","Implementing data quality and governance frameworks","Creating analytics dashboards and reporting","Building real-time streaming pipelines with Kafka and Flink","Implementing exactly-once streaming semantics","Monitoring streaming quality (consumer lag, data freshness, schema drift)","Implementing Flink Java DataStream jobs with session\u002Ftumbling windows","advanced",[60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],"Python","SQL","Apache Spark","Airflow","dbt","Apache Kafka","Apache Flink","AWS Kinesis","Spark Structured Streaming","Kafka Streams","PostgreSQL","BigQuery","Snowflake","Docker","Schema Registry","TODO: Quantify time savings",[],{"assets":78,"scripts":79,"references":80},[],[],[],"Python 3.8+; platforms: macos, linux, windows",[],[],[],[],"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":94,"prompt":104,"zipAvailable":46},[95,98,101],{"tool":96,"command":97},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill senior-data-engineer",{"tool":99,"command":100},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill senior-data-engineer",{"tool":102,"command":103},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill senior-data-engineer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002FSKILL.md",[106,111,114,117,123,127,131,135,141,145,149,153,157],{"path":107,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":14,"sourceHtmlUrl":110},"assets\u002F.gitkeep","ASSET","资产文件","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fassets\u002F.gitkeep",{"path":112,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":14,"sourceHtmlUrl":113},"assets\u002Fdata-quality-checklist.md","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fassets\u002Fdata-quality-checklist.md",{"path":115,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":14,"sourceHtmlUrl":116},"assets\u002Fpipeline-design-template.md","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fassets\u002Fpipeline-design-template.md",{"path":118,"resourceType":119,"resourceTypeDesc":120,"sizeBytes":121,"sourceHtmlUrl":122},"HOW_TO_USE.md","REFERENCE","参考文档",2500,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002FHOW_TO_USE.md",{"path":124,"resourceType":119,"resourceTypeDesc":120,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fframeworks.md",42313,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Freferences\u002Fframeworks.md",{"path":128,"resourceType":119,"resourceTypeDesc":120,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Ftemplates.md",67136,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Freferences\u002Ftemplates.md",{"path":132,"resourceType":119,"resourceTypeDesc":120,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Ftools.md",39140,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Freferences\u002Ftools.md",{"path":136,"resourceType":137,"resourceTypeDesc":138,"sizeBytes":139,"sourceHtmlUrl":140},"scripts\u002Fdata_quality_validator.py","SCRIPT","脚本",3489,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fscripts\u002Fdata_quality_validator.py",{"path":142,"resourceType":137,"resourceTypeDesc":138,"sizeBytes":143,"sourceHtmlUrl":144},"scripts\u002Fetl_performance_optimizer.py",3504,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fscripts\u002Fetl_performance_optimizer.py",{"path":146,"resourceType":137,"resourceTypeDesc":138,"sizeBytes":147,"sourceHtmlUrl":148},"scripts\u002Fkafka_config_generator.py",41177,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fscripts\u002Fkafka_config_generator.py",{"path":150,"resourceType":137,"resourceTypeDesc":138,"sizeBytes":151,"sourceHtmlUrl":152},"scripts\u002Fpipeline_orchestrator.py",3487,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fscripts\u002Fpipeline_orchestrator.py",{"path":154,"resourceType":137,"resourceTypeDesc":138,"sizeBytes":155,"sourceHtmlUrl":156},"scripts\u002Fstream_processor.py",60553,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fscripts\u002Fstream_processor.py",{"path":158,"resourceType":137,"resourceTypeDesc":138,"sizeBytes":159,"sourceHtmlUrl":160},"scripts\u002Fstreaming_quality_validator.py",40005,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillAxe-Opus47-Gold15-20260921\u002Ftasks\u002Fflink-query\u002Frepaired_skill\u002Fsenior-data-engineer\u002Fscripts\u002Fstreaming_quality_validator.py",[162,170,177,184,189,194],{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":166,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":166,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":166,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":185,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":166,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":190,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":166,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":193,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":195,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":166,"licenseFileUrl":6,"sourceHtmlUrl":196,"categories":197,"keywords":198,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]