run-mappings-locally
БесплатноБез исполняемых скриптовНе проверенRun ingest view mappings against real ingest view results in staging to verify that all rows parse. Use when the user wants to test ingest mappings or an…
от Recidiviz★ 48 звёзд на GitHubОб этом скилле
Skill: Run Mappings Locally
Overview
Run an ingest view's mappings (the manifest YAML) against the view's real results in a GCP project to verify that every row parses. This catches mapping errors that fixture-based tests miss, because it runs against the latest raw data rather than hand-written fixtures. Use it when changing a mapping YAML, changing an ingest view query, or debugging a parse failure in the ingest pipeline.
The command
python -m recidiviz.tools.ingest.development.run_mappings_against_ingest_view_results \
--project-id recidiviz-staging \
--state-code [STATE_CODE] \
--ingest-view-name [INGEST_VIEW_NAME]
- Flags use hyphens, not underscores (
--project-id,--state-code,--ingest-view-name). --project-idis required (recidiviz-stagingorrecidiviz-123; use staging unless the user explicitly asks for prod).--state-codeis required, e.g.US_ND.--ingest-view-nameis the bare view name: noview_prefix and no.pyextension. For the view builder filerecidiviz/ingest/direct/regions/us_nd/ingest_views/view_elite_alias.py, pass--ingest-view-name elite_alias. If the name is wrong, the script errors with a "Did you mean ...?" suggestion.
Optional flags
--ingest-pipeline-type [ACTIVITY|IDENTITY]— which pipeline's views and mappings to run. Defaults toACTIVITY(views under the region'singest_views/directory). PassIDENTITYfor views under the region'sidentity_views/directory.--write-results— also writes each parsed entity tree to a results file so you can inspect what the mapping produces. This slows the run down significantly; leave it off when you only need a pass/fail signal.
What it does and where output goes
- Builds the ingest view query and runs it against the project's latest PRIMARY raw data.
- Validates that the query result schema matches the
input_columnsdeclared in the mapping YAML — a mismatch fails immediately with the missing / mismatched columns listed. - Parses every result row with the compiled manifest. Parse errors don't stop
the run; each failing row and its traceback are appended to
mappings_errors.txtin the system temp directory (the script logs the exact path at startup). With--write-results, parsed entity trees go tomappings_results.txtin the same directory.
A run that ends with "Parsed successfully." means every row parsed. Otherwise read the errors file for the failing rows.
Caveats
- The script only tests the view against the latest raw data. Bad raw data that a newer version of the row has since overwritten will not be caught.
- The query runs against real state data in BigQuery — results and error logs can contain PII. Never paste row contents into PRs, issues, or commit messages.
Related Documentation
recidiviz/tools/ingest/development/run_mappings_against_ingest_view_results.py— the script itselfrecidiviz/ingest/direct/types/ingest_pipeline_type.py— pipeline types and the per-region view/manifest subdirectories they map to
Установить run-mappings-locally в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл run-mappings-locally?
Run ingest view mappings against real ingest view results in staging to verify that all rows parse. Use when the user wants to test ingest mappings or an ingest view manifest against real raw data (e.g. "run the mappings for this view", "test this ingest view against staging", "does this mapping change parse all the real data?").
Как установить скилл run-mappings-locally?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл run-mappings-locally запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic