Hey all, This can be done in catalog.yml to acce...
# questions
c
Hey all, This can be done in catalog.yml to access data through namespace, how can I do this in parameters.yml???
Copy code
"{namespace}.data_fro":
    type: xyz
    filepath: "path/to/data/{namespace}/month.csv"
n
This feature is newly added with the purpose to simplify
catalog.yml
which is often huge and verbose. How do you want to use it for parameters?
c
I have parameters defined which I want to use in every pipeline they are static. If I give namespace to my pipelines, it automatically gets added to params:namespace.model.
So either i should be able to add namespace in parameters.yml or use parameters.yml without namespace
m
If you want to use the same parameters in every pipeline then use
Copy code
from kedro.pipeline.modular_pipeline import pipeline
pipeline(
   parameters={"params:model_options": "params:model_options"},
   #... rest of the args
)
Keys in dict are names of the parameters within the “namespaced” piepline, values are parameters “from root” = parameters.yml
👍🏼 1
n
Agree with @marrrcin, it seems like you just want to escape from the namespace
c
@marrrcin works like a charm, but why does it work??
😎 1
m
The
parameters=
in the modular pipeline’s constructor maps the parameters from the “un-namespaced” ones to the “namespaced” ones
In this arg, you’re basically telling Kedro: “Hey, please map my params from root (values) into those params in my namespaced pipeline (keys)”
c
Nice thank you so much
m
You can also have things like:
Copy code
parameters={"params:name_that_you_use_in_the_namespaced_pipeline": "params:other_name"},
n
This is exactly how the args for pipeline works. I guess the symmetry of the arguments between node and pipeline is confusing because they are doing different thing. How can we improve this docs to make it clearer? https://docs.kedro.org/en/stable/nodes_and_pipelines/modular_pipelines.html#using-the-modular-pipeline-wrapper-to-provide-overrides