minmin
11/15/2024, 5:34 PM"{namespace}.spreadsheet_data":
type: pandas.ExcelDataset
filepath: data/03_primary/all_data_sources.xlsx
save_args:
sheet_name: "{namespace}_data"
but this doesn't work. I just end up with a spreadsheet with one sheet - with the name of whatever namespace ran last. I.e. it must be overwriting it each time.
I have read that I will need to specify a writer if I want to write to a file that already exists (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_excel.html) but I can't get that to work.
Is what I would like to do possible?
Many thanksHall
11/15/2024, 5:34 PMRavi Kumar Pilla
11/15/2024, 5:44 PMif_sheet_exists
which might help.Ravi Kumar Pilla
11/15/2024, 5:52 PM"{namespace}.spreadsheet_data":
type: pandas.ExcelDataset
filepath: data/03_primary/all_data_sources.xlsx
save_args:
writer:
mode: a
if_sheet_exists: new
sheet_name: "{namespace}_data"
Something like above ?Ankita Katiyar
11/18/2024, 8:12 AMkwargs
to the underlying load and save functions with save_args
and load_args
in the Data Catalog configuration. There’s a few examples on this page - https://docs.kedro.org/en/stable/data/data_catalog_yaml_examples.htmlminmin
11/18/2024, 4:53 PM