I'm always frustrated when I get a DataSetNotFoundError: for typos. Would it be possible to look at the catalog for similarly named entries and suggest them similar to click-didyoumean
Mostly when ad-hoc loading dataset its sometimes hard to remember long dataset names. It would be helpful if kedro could suggest the correct spelling if I miss it by a few characters.
(Optional) Suggest an idea for implementing the addition or change.
---------------------------------------------------------------------------
DataSetNotFoundError Traceback (most recent call last)
<ipython-input-22-0b55c03ca6c5> in <module>
----> 1 catalog.load("raw_C")
/path/to/data_catalog.py in load(self, name, version)
347 if name not in self._data_sets:
348 raise DataSetNotFoundError(
--> 349 "DataSet '{}' not found in the catalog".format(name)
350 )
351
- DataSetNotFoundError: DataSet 'raw_C' not found in the catalog
+ DataSetNotFoundError: DataSet 'raw_C' not found in the catalog
+ did you mean 'raw_c'?
Let me know if this should be combined with #336
This seems like a good idea.
Can be implemented with simple Jaccard similarity between the name and self._data_sets.keys(). To prevent irrelevant recommendations, have a threshold on the similarity metric.
Thanks for suggesting this @WaylonWalker! I've added it to our backlog so we can look into this.
Hi @WaylonWalker , thank you for the suggestion! It has been addressed in this commit, closing this issue as resolved.
Awesome. Thanks @lorenabalan !
鉂わ笍 f-strings