seed-data

Prepare, validate, and reload seed CSV files for Spring Batch database initialization jobs.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/LeeHyunWoo02/ProvinceHow --skill seed-data-leehyunwoo02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: seed-data
Source: https://github.com/LeeHyunWoo02/ProvinceHow/tree/main/.claude/skills/seed-data
Command: npx skills add https://github.com/LeeHyunWoo02/ProvinceHow --skill seed-data-leehyunwoo02

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? It prevents silent or failed database seeding in the ProvinceHow backend by guiding the preparation, validation, and reload of seed CSV files that eight Spring Batch jobs load into a containerized MySQL database at application startup. ## Core Features & Use Cases - Seed File Specification Management: Documents the exact file paths, encodings (UTF-8 vs MS949), headers, and @Order-based foreign key dependencies for all eight seed jobs. - Pre-flight Validation: Interprets the verify-seed.sh report covering file existence, encoding/BOM, referential integrity, and DB connection settings before running docker compose up. - Failure Diagnosis & Reload: Maps 13 failure symptoms (FileNotFoundException, FlatFileParseException, silent Processor skips, BatchGuard skips) to fixes, and controls re-execution via SEED_VERSION. - Use Case: When a batch completes but the infra table is empty, use this Skill to trace the silent FK-mismatch skip, fix the CSV columns and BOM, bump SEED_VERSION, and reload. ## Quick Start Ask the assistant to verify the seed CSV files in data/ against the batch specs and diagnose why a seed job was skipped or loaded empty rows.

Frequently Asked Questions about seed-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reload seed data in a Spring Batch application?

Bump the SEED_VERSION value in backend.env and restart with docker compose up --build. BatchGuard skips jobs whose jobName and seedVersion already have a COMPLETED record, so a new version forces all seed jobs to rerun. Most jobs use upsert writers, so tables rarely need manual clearing.

Why did my Spring Batch job complete but the table is empty?

The Processor silently skips rows whose foreign key codes have no matching parent record, returning null instead of throwing an exception. Check the referential integrity section of verify-seed.sh and confirm the predecessor batch with the lower @Order actually loaded its data.

How do I fix Korean characters loading as question marks from CSV?

The file encoding must match the encoding hardcoded in the batch reader: sido, sigungu, and industry use UTF-8 while the others use MS949. Convert files with iconv, and verify the MySQL container uses utf8mb4 with characterEncoding=UTF-8 in the JDBC URL.

Why does my Spring Batch job not appear in the logs at all?

The Runner bean is gated by @ConditionalOnProperty on seed.jobs.<key>.enabled, so a false value means the bean is never registered and no log line is produced. Set the property to true in both dev and prod property files after preparing the CSV file.

Can I rerun only one failed seed job instead of all of them?

No, there is no per-job rerun mechanism. Raising SEED_VERSION reruns all seed jobs, including the slow dwelling job that calls an external API for twelve months of data. Plan version bumps accordingly.