Hi all I would like to create a custom dataset whi...
# questions
j
Hi all I would like to create a custom dataset which extends
pandas.GBQTableDataset
as I want the table schema to be generated automatically based on a polars DF. One challenge that I am facing is that GBQTableDataset expects a kwarg `dataset`, however in the catalog I want to use
kwarg
dataset to point kedro to the location of my custom dataset class. I have tried to rename the original kwarg
dataset
to
gbq_dataset
extend
pandas.GBQTableDataset
and then do
super().__init__(dataset=gbq_dataset)
However construction then fails with
GBQTableDataset.__init__() got an unexpected keyword argument 'gbq_dataset'
In this specific case, how can I point kedro to my custom dataset class while maintaining the original
dataset
parameter?
j
Hi Janick, Thank you for your question. What versions of Python and Kedro are you using?
j
kedro: 0.19.8 python: 3.11
But I just realized I can simply define
type:
in the catalog pointing to my custom dataset
j
define
type:
in the catalog pointing to my custom dataset
Does this solve your problem ?
j
Yeah I think so, just testing it
👍 1
Worked fine 🙂 thanks for the help