-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to leverage YAML anchors & aliases to avoid copy-pasting properties in catalog #2127
Comments
LMK if that's something you would want in the docs, I'm happy to open a PR if so. |
Good idea! @pascalwhoop was complaining about the same thing in kedro-org/kedro-plugins#774 I'm moving this to Framework to properly document this trick. Should work with anything really (credentials, |
metadata.kedro-viz.layer
in catalog
Can we use variable interpolation instead? |
Discussed in backlog grooming that we'll add a "note" block in the Kedro viz docs and also link to the existing description on yaml anchors in the Kedro docs: https://docs.kedro.org/en/stable/data/data_catalog_yaml_examples.html#load-multiple-datasets-with-similar-configuration-using-yaml-anchors |
@rashidakanchwala / @merelcht can I take this one? |
Of course! Thanks @yury-fedotov ⭐ |
@yury-fedotov , October is already over, but let me know if you are still keen on taking on this one. |
Hey @rashidakanchwala ! Sorry, my bad, I didn't follow up. I'll have time this week to do that - have you already started, or could/should I? |
Sure, please go ahead. thanks again! |
Ok! |
Description
This section of docs provides a guide to adding
layers
to the visualization by defining them as follows:Also it gives the following example below:
Context
In my projects I found it very helpful to use YAML anchors to save those 3 lines per layer into a variable like this:
And then reuse it like this:
Possible Implementation
What I propose to do it to add a small note admonition suggesting that YAML anchors & aliases can be a great fit here to avoid copypasting those 3 lines if you have e.g. 10 datasets defined in a layer.
By admonition I mean e.g. this:
It can mention that this feature is not Kedro-specific at all and enabled by YAML format itself, but I think it can be helpful since this trick is highly reusable and can simplify large catalogs quite a lot for users unfamiliar with anchors & aliases in YAML.
Checklist
The text was updated successfully, but these errors were encountered: