Iñigo Hidalgo
02/15/2024, 10:29 AMKedro-Viz version 6.3.0 currently supports preview of two types of datasets:
•pandas.CSVDataset
•Is there something I can do on my end to make a custom dataset compatible with dataset preview? I would like to show an arrow dataset's schema in the preview fieldpandas.ExcelDataset
Nok Lam Chan
02/15/2024, 10:50 AMNok Lam Chan
02/15/2024, 10:51 AMIñigo Hidalgo
02/15/2024, 10:59 AMpreview
method and correctly typing it with TablePreview
would be enough?Iñigo Hidalgo
02/15/2024, 11:00 AMpreview_args
metadata? or is it meant to specifically be nrows
?Nok Lam Chan
02/15/2024, 12:19 PMpreview()
method, so it's arbitrary arguments. For type hint, you need to follow the type hint and return the corresponding type. For example for table I think it's expecting a JSON format, the way that I think of it it's like a payload sending to the frontend (viz).Nok Lam Chan
02/15/2024, 12:20 PMpreview
method in existing datasets, they should have different signaturesIñigo Hidalgo
02/15/2024, 12:51 PMNok Lam Chan
02/15/2024, 1:14 PMAntony Milne
02/19/2024, 9:23 AMpreview
arguments so that it can be run without the user needing to specify explicit values in catalog.yml.Nero Okwa
02/19/2024, 10:32 AMNero Okwa
02/19/2024, 10:41 AMIs there something I can do on my end to make a custom dataset compatible with dataset preview?
I would like to show an arrow dataset's schema in the preview field@Iñigo Hidalgo Thanks for this. QQ what problem would dataset preview be solving for you for this? How have you previously shown an arrow dataset schema? 🙂
Iñigo Hidalgo
02/19/2024, 10:45 AMdef preview(self, show_statistics=False)
where if show_statistics is true, it could show various statistics in further rows.Iñigo Hidalgo
02/19/2024, 10:50 AMsome reservations around the mechanism around using type hints for this (including from myself) so I’d be interested in hearing what you think of iton the technical side of things I can't really comment on what I think its possible limitations could be. It's true that it's kind of a different way of doing things than we're used to in python/kedro world. Thinking of pure-python implementations without type hints I might have gone towards having different
preview_table
, preview_plotly
methods or something like that, but I'm sure that would've had its own set of issues.
As far as the merged feature goes, I like the implementation. As long as the documentation is updated (particularly the fact that we aren't actually expected to return a table, rather a json object), it is clear what we're supposed to do and how to do it, so I like it.Antony Milne
02/19/2024, 11:01 AMIñigo Hidalgo
02/19/2024, 11:07 AMIñigo Hidalgo
02/19/2024, 11:20 AM