Hello! Is it possible to register a data catalog e...
# questions
j
Hello! Is it possible to register a data catalog entry as a versioned file (versioned=True) via kedro.io.DataCatalog ? I only find information about how to do this in the yml file.
s
Yes! All the kwargs can be passed exactly the way you can in catalog.yml
j
How exactly?
Copy code
io = DataCatalog(
    {
        "myfile": ExcelDataSet(filepath="path/to/file.xlsx", versioned=True),
    }
)
This gives me
TypeError: __init__() got an unexpected keyword argument 'versioned'
😕
n
The keyword argument to Excel dataset should be « load_args » ! And then, I guess as a value a dictionary with versioned:true
j
Not working. I also tried to set
save_args
because I guess that would make sense but it gives another error. I don't think versioning is activated that way 🤔
n
There is a version parameter in the ExcelDataSet, but it’s not just a bool. 🤔
j
Thanks! It's working with
ExcelDataSet(filepath='path/etc/file.xlsx', version=Version(load=None, save=None))
where Version is imported from
<http://kedro.io|kedro.io>
. This will use the default behaviour for versioning 🙂