malloy-materialization

Installation
SKILL.md

Materialization (Malloy Persistence)

Materialize an expensive source once so queries read a pre-built warehouse table instead of recomputing it every time. You tag a source #@ persist, a materialization run builds it into a physical table, and queries against it are rewritten to read that table.

The #1 gotcha, up front: if a persist source isn't materializing, it is almost always one of two things - a .malloy file in the package missing the ##! experimental.persistence flag (which aborts the whole package's build plan), or no build ever ran (a standalone Publisher does not build on publish - see Building and refreshing). Jump to Debugging a no-op build.

The recipe (get this right and it just works)

  1. ##! experimental.persistence on EVERY .malloy file in the package - not only the file that declares the persist source. Either form enables it:

    • ##! experimental.persistence, or
    • ##! experimental { access_modifiers, sql_functions, persistence } (add persistence to the existing list).

    Why every file: the build plan is computed by asking every .malloy file in the package for its persist sources, and that call throws on any file whose model lacks the flag (Model must have ##! experimental.persistence). One unflagged helper or import file, even one with no persist source of its own, aborts the whole package's build plan, so every persist source in the package drops out. This is the most common cause of a no-op build.

Installs
3
GitHub Stars
97
First Seen
Aug 2, 2026
malloy-materialization — malloydata/publisher