﻿# Kedro dataset factories: a catch-all rule can change an intermediate from memory to persistent storage

Review Kedro factory resolution when introducing broad catalog patterns, checking whether previously ephemeral intermediates acquire file destinations or unexpected dataset implementations.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-kedro-factory-fallback-materialization-contract/
Language: en

## Observe the resolved implementation behind a name

A developer adds a catch-all catalog pattern to simplify saving model-analysis tables. An unrelated intermediate that previously lived only in memory now resolves to a file-backed dataset. The [factory concepts guide](https://docs.kedro.org/en/stable/catalog-data/kedro_dataset_factories/) describes dataset patterns, user catch-all patterns and default runtime patterns. A fallback is therefore part of the materialization policy. Review what implementation each pipeline name resolves to, not only whether the YAML became shorter or every node still has the same signature.

## Distinguish a general rule from its intended population

A rule written for table outputs can match values that are not tables, such as a model object, a partition loader mapping or a transient diagnostics structure. The pattern matcher does not independently know that these names should have different persistence roles. Use a naming convention with a defined domain or explicit entries for exceptions. A serialization failure is one possible symptom; more subtly, a successfully saved value can still have an unintended external lifetime or location.

## Account for runtime fallback behavior

The [DataCatalog API](https://docs.kedro.org/en/stable/api/io/kedro.io.DataCatalog/) distinguishes ordinary dataset lookup from lookup with runtime fallback enabled. A manual exploratory call and an actual pipeline run can therefore exercise different fallback behavior. Inspect the contract of the path being tested. A missing result from an ordinary lookup is not, by itself, proof that execution cannot materialize the named intermediate. Conversely, successful runtime fallback does not establish that the selected implementation matches the research team's storage intention.

## Resolve patterns before trusting the resulting files

The [factory how-to guide](https://docs.kedro.org/en/stable/catalog-data/how_to_use_dataset_factories/) explains configuring and inspecting dataset factory resolution. Check representative specific matches, catch-all matches and internal fallbacks. Also inspect the resolved physical destinations so generalized rules do not send unrelated outputs to a shared path. Preserve the distinction between an explicitly configured persistent output and an incidental intermediate that is only needed during one execution. The same graph can remain syntactically valid while these storage relationships change substantially.

## Test names that should and should not persist

Use small recognizable table and non-table outputs, then inspect their resolved dataset classes and expected destinations under the proposed rules. Related guides cover [explicit table schemas](/journal/data-guide-frictionless-table-schema/) and [artifact release manifests](/journal/tokenizer-artifact-release-manifest/). The useful check is the materialization contract for each name category. A concise catalog is valuable when it preserves intended behavior; its brevity alone does not demonstrate that every intermediate now has the right persistence, serialization and ownership policy.
