Skip to content
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

Make layer less verbose #774

Closed
pascalwhoop opened this issue Jul 17, 2024 · 6 comments
Closed

Make layer less verbose #774

pascalwhoop opened this issue Jul 17, 2024 · 6 comments

Comments

@pascalwhoop
Copy link

Hi y'all

we recently switched from

layer: foo

to

  metadata:
    kedro-viz:
      layer: 04_features

that's super verbose. Can we please get

  metadata.kedro-viz.layer: 01_raw

? Else the catalog just becomes suuuuper verbose. There must be a way to be yaml compliant when writing catalog yaml no?

@pascalwhoop
Copy link
Author

I know this is probably kedro datasets originating, then let's fix it there :)

@astrojuanlu
Copy link
Member

There must be a way to be yaml compliant when writing catalog yaml no?

The closest YAML-compliant, 1 liner I can think of that achieves the same structure is

ds:
  type: ...
  metadata: {"kedro-viz": {"layer": "04_features"}}

But that's even more annoying to type... (unsure if these are "Flow style" or "Block style" as per the YAML spec)

This is hardly a kedro-viz issue though, moving it to kedro-plugins for now

@astrojuanlu astrojuanlu transferred this issue from kedro-org/kedro-viz Jul 21, 2024
@noklam
Copy link
Contributor

noklam commented Sep 9, 2024

There must be a way to be yaml compliant when writing catalog yaml no?

I am happy if this exists, as of the moment the issue hasn't been addressed, see omry/omegaconf#1188

Alternatlively, you can remove some typing with variable interpolation?

catalog.yml

_viz_feature_layer:
  kedro-viz:
    layer: 04_features

my_dataset:
  ...
  metadata: ${_viz_feature_layer}

?

@astrojuanlu
Copy link
Member

Also see kedro-org/kedro-viz#2127

@merelcht
Copy link
Member

merelcht commented Oct 7, 2024

Discussed this in backlog grooming and we decided to not change anything about the layer definition. The metadata key was introduced to allow more flexible entries in the datacatalog for plugins (like Kedro-Viz).

@merelcht merelcht closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
@astrojuanlu
Copy link
Member

And to clarify, there are ways to make this simpler, like YAML anchors kedro-org/kedro-viz#2127 or even Omegaconf variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants