Dpla run ingest

From dpla/ingestion3 · View interactive version

Dpla run ingest is an AI agent skill from the GitHub repository dpla/ingestion3. Execute a single-hub or manual ingest by following the correct runbook and scripts. Use when the user says run ingest for [hub], harvest [hub], remap [hub], or run the full pipeline for [hub]. Ensures harvest type is identified, correct runbook and scripts are used, and outputs are verified.

How to use this skill

Skill file

DPLA Run Ingest

Purpose

Run an ingest for a specific hub using the right runbook and scripts, then verify output. Use this for single-hub or manual runs (for multi-hub/scheduled runs, use the orchestrator instead).

When to Use

Environment: Scripts that source common.sh (harvest.sh, ingest.sh, remap.sh, etc.) automatically load $I3_HOME/.env when present, so JAVA_HOME, DPLA_DATA, I3_CONF, SLACK_WEBHOOK, etc. are set before the JAR is built or the pipeline runs. You do not need to run source .env separately. Full checklist: AGENTS.md ยง Environment and build.

Checklist

  1. JAR is built automatically: When you run ./scripts/harvest.sh (or ingest.sh, remap.sh, etc.), run_entry in common.sh runs sbt assembly if the JAR is missing or if any Scala source is newer than the JAR. So "harvest indiana" will use current code without a separate build step. (You can still run sbt assembly first to avoid a build delay on the first harvest.)
  2. Identify the hub (e.g. from the user message).
  3. Get harvest type from i3.conf ($I3_CONF, default ~/dpla/code/ingestion3-conf/i3.conf): <hub>.harvest.type. Values: localoai, api, file, nara.file.delta.
  4. Pick the runbook: See runbooks/README.md for harvest-type to runbook mapping.
  5. Run the scripts from the runbook (see scripts/SCRIPTS.md). Examples:
  1. Verify outputs: _SUCCESS in the step output dirs; _MANIFEST / _SUMMARY for counts.
  2. S3 sync when the runbook says so: ./scripts/s3-sync.sh <hub>.
  3. On failure: Post to #tech-alerts or email tech@dp.la with hub, stage, and error or path to escalation report.

Critical Rules

Verification Commands

ls $DPLA_DATA/<hub>/harvest/<timestamped-dir>/_SUCCESS
ls $DPLA_DATA/<hub>/mapping/<timestamped-dir>/_SUCCESS
ls $DPLA_DATA/<hub>/jsonl/<timestamped-dir>/_SUCCESS

cat $DPLA_DATA/<hub>/harvest/<timestamped-dir>/_MANIFEST
cat $DPLA_DATA/<hub>/mapping/<timestamped-dir>/_SUMMARY

Incomplete runs (e.g. _temporary but no _SUCCESS) should be deleted before retrying.

Before/after checklist

Before running:

After a run:

Resuming failed steps

  1. Check which steps completed (look for _SUCCESS files in harvest/, mapping/, enrichment/, jsonl/).
  2. Re-run only the failed step and later steps. Example: if mapping succeeded but enrichment failed, run ./scripts/enrich.sh <hub> then ./scripts/jsonl.sh <hub>.
  3. For the full pipeline (IngestRemap), it must be re-run from scratch since it does mapping+enrichment+jsonl in one Spark application.

Key References

| Resource | Path |

|----------|------|

| Runbook index and mapping | runbooks/README.md |

| Script reference | scripts/SCRIPTS.md |

| Agent guide | AGENTS.md |

| Config | i3.conf at $I3_CONF |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.