Bjarne Hiller
05/04/2026, 3:48 PMRavi Kumar Pilla
05/04/2026, 7:22 PMBjarne Hiller
05/05/2026, 8:03 AMPartionedDatasets, and I am not sure if they fit my use case exactly. What I want is basically to let the user run something like this kedro run -p benchmark --params model=model_a --params dataset=dataset_b. I guess I could use a PartionedDataset and a param to select the right loader for the pipeline - however, the node would then return results only for this dataset. Would I again return a partioneddataset? Also, it feels weirdly contradictionary to kedro's philosophy, as this is actually not really a PartionedDataset (i.e., data spread across multiple files), but a set of individual Datasets.Ravi Kumar Pilla
05/08/2026, 3:33 PMRavi Kumar Pilla
05/08/2026, 6:15 PMBjarne Hiller
05/08/2026, 6:36 PMRavi Kumar Pilla
05/08/2026, 6:58 PMRavi Kumar Pilla
05/08/2026, 7:09 PMafter_catalog_created to dynamically add catalog entries, but still generate the pipeline graph elsewhere.
2. Discover the files before/during register_pipelines() and generate one namespaced pipeline instance per discovered dataset. Dataset factories can then resolve the concrete dataset names.
3. May be have a node which outputs the new dataset name that goes as an input to the user_ds_pipe (This disturbs the data lineage)
The flow I can think of is -
⢠scan data/01_raw/custom-dataset,
⢠generate concrete dataset names,
⢠create one namespaced modular pipeline per dataset,
⢠let dataset factories resolve the actual catalog entries.
Let me see if we can get other opinions here @Ankita Katiyar @Jitendra GundaniyaBjarne Hiller
06/08/2026, 3:54 PMregister_pipeline. Maybe something like this would work?
1. user adds a new dataset folder to 01_raw
2. It is picked up by the data catalogue via a dataset factory
3. The user configures a dataset parameter to select the dataset to run the pipelines on
4. A after_context_created hook reads the dataset parameter from the kedro context
5. The dataset parameter is passed down to register_pipelines , where it is injected as input to the predict pipeline
Would this work? What do you think?Ravi Kumar Pilla
06/08/2026, 8:11 PMkedro run --pipeline predict_dataset_a
# src/my_project/pipeline_registry.py
from pathlib import Path
from kedro.pipeline import Pipeline, pipeline
from my_project.pipelines.predict import create_pipeline as create_predict_pipeline
def _discover_custom_datasets() -> list[str]:
root = Path("data/01_raw/custom-dataset")
if not root.exists():
return []
return sorted(
p.name
for p in root.iterdir()
if p.is_dir()
)
def register_pipelines() -> dict[str, Pipeline]:
pipelines = {}
for dataset_name in _discover_custom_datasets():
pipelines[f"predict_{dataset_name}"] = pipeline(
create_predict_pipeline(),
namespace=f"predict_{dataset_name}",
inputs={
"raw_input": f"custom.{dataset_name}.raw",
},
outputs={
"predictions": f"custom.{dataset_name}.predictions",
},
parameters={
"params:predict": "params:predict",
},
)
pipelines["__default__"] = sum(pipelines.values(), Pipeline([]))
return pipelines
# conf/base/catalog.yml
"custom.{dataset_name}.raw":
type: pandas.CSVDataset
filepath: data/01_raw/custom-dataset/{dataset_name}/input.csv
"custom.{dataset_name}.predictions":
type: pandas.ParquetDataset
filepath: data/07_model_output/custom-dataset/{dataset_name}/predictions.parquet
# This gives you good lineage because the graph contains concrete datasets such as:
custom.dataset_a.raw
custom.dataset_a.predictions
custom.dataset_b.raw
custom.dataset_b.predictions
If you really want the --params way to do, may be create an additional node within the pipeline -
# src/my_project/pipelines/predict/pipeline.py
from kedro.pipeline import Pipeline, node
def create_pipeline(**kwargs) -> Pipeline:
return Pipeline(
[
node(
func=load_selected_dataset, # this node takes the param and selects the dataset to process
inputs=["params:dataset"],
outputs="selected_raw_input",
name="load_selected_dataset",
),
node(
func=predict,
inputs=["selected_raw_input", "model"],
outputs="predictions",
name="predict",
),
]
)Ravi Kumar Pilla
06/08/2026, 8:14 PMRavi Kumar Pilla
06/08/2026, 8:14 PMJitendra Gundaniya
06/09/2026, 2:37 PMafter_context_created hook reads the dataset param and hands it to register_pipelines(), which builds the pipeline for that one dataset:
kedro run -p predict --params dataset=dataset_b
This keeps your registry clean (just predict). Two things to watch out for:
- On newer Kedro version, have the hook read context.config_loader.runtime_params, not context.params. Reading context.params loads the pipeline registry too early, and
you'll get "Failed to find the pipeline named 'predict'".
- Since the pipeline only exists once you pass the param, it won't show up in kedro registry list or kedro-viz.
2) One pipeline per folder (Ravi's idea):
register_pipelines() scans data/01_raw/custom-dataset/ and creates a predict_<name> pipeline for each folder, and the dataset factories handle the catalog:
kedro run -p predict_dataset_b # just one
kedro run # all of them
Drop a new folder in and its pipeline shows up on its own, no code changes. Everything's visible in registry list and kedro-viz, and the lineage stays clean. The only real downside is that the registry gets long if you have a lot of datasets.
Both cover the main thing you asked for: people add a folder and nobody has to touch code or config. But 1 is more on workaround side.