Join the Kedro community

Updated 7 days ago

Specifying global options for a kedro project

Hello all! Is there a place where I can specify global options for my Kedro project? For instance, I'd like to preview 20 rows instead of 5 (the default) in Kedro Viz (and I don't want to do it individually for each dataset).

R
F
R
4 comments

Hi Francis, We currently do not have a global default for preview as preview_args are dataset specific. cc:

Alright , thanks!

currently, we don't but you could use yaml anchors to simplify it maybe. U would still have to define it for each dataset.

_preview_args: &preview_args
  preview_args:
    nrows: 20

companies:
  type: pandas.CSVDataset
  filepath: ${_base_location}/01_raw/companies.csv
  metadata:
    kedro-viz:
      layer: 01_raw
      <<: *preview_args

reviews:
  type: pandas.CSVDataset
  filepath: ${_base_location}/01_raw/reviews.csv
  metadata:
    kedro-viz:
      layer: 01_raw
      <<: *preview_args

Thanks! At least if I want to change it, it's one place only

Add a reply
Sign up and join the conversation on Slack