https://kedro.org/ logo
Title
b

Burn1n9m4n

03/28/2022, 10:33 PM
Is there a way to output an excel file from a Kedro pipeline that uses the autofilter function from xlsxwriter? I want to be able to provide a complete data set that comes prefiltered when it is opened by the user
a

avan-sh

03/29/2022, 4:10 AM
Hi @User , it feels like one of below approaches would work. 1. Adding a hook that reads the file and adds a filter is simpler. Either
after_pipeline_run
or
after_dataset_saved
hook should work. 2. Create a custom dataset extending the ExcelDataset and add the option to filter after calling the _save method Option 1 might be simpler but might need hardcoding the file path. Maybe @User can suggest a cleaner approach. LMK if you need further clarifications
d

datajoely

03/29/2022, 10:31 AM
I think this is right - but I'm going to add my response on the discussion @User created 🙂 https://github.com/kedro-org/kedro/discussions/1380