# `mix mimir_analytics.ingest`
[🔗](https://github.com/cash-mckeeman/mimir/blob/mimir_analytics-v0.8.1/mimir_analytics/lib/mix/tasks/mimir_analytics.ingest.ex#L1)

Ingests every non-ledgered buffer file, resolves model-call run ids, and
(re)applies the consumer views. See the README.

Only `--sessions` is a spool: each session file that ingests is moved
into `<dir>/.ingested/`. `--gateway` and `--evals` files are left where
they are — other tools read those directories — and re-runs skip them
through the ingest ledger.

The spool's write protocol: a producer writes each file once, under a
dot-prefixed temporary name in the same directory, and renames it to its
final `*.jsonl` name when it is complete. Only those published names are
read; a temporary file is neither ingested nor moved.

`--db` accepts a local path (dev/test) or `motherduck:<db_name>`
(deployment; token from MOTHERDUCK_TOKEN).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
