# data/batch/

This guide was generated by `xuda-cli`.

You can remove all generated folder guides later with:

~~~bash
npm run clean:readmes
~~~

Use this folder for Xuda `batch` units.

## What belongs here

- record iteration jobs
- backfill or recalculation flows
- loop-based processing that should stay outside UI components

## Recommended blocks

- `<meta lang="json5">`
- optional `<params lang="json5">`
- `<datasource lang="json5">`
- optional `<fields lang="json5">`
- `<events lang="json5">`

## Important rules

- use `before_record` and `after_record` when you need per-record workflows
- batch is a good home for recalculation, migration, enrichment, or summary jobs
- keep long-running processing here instead of inside components

## Example

~~~xml
<meta lang="json5">
{
  id: "rebuild_class_roster",
  menuTitle: "Rebuild Class Roster"
}
</meta>

<datasource lang="json5">
{
  type: "table",
  table: "student_profiles_table",
  output: "students_out"
}
</datasource>

<events lang="json5">
{
  before_record: [
    { action: "delay", name: { value: "1" } }
  ]
}
</events>
~~~
