Can a custom resolver be used to fill in a catalog...
# questions
g
Can a custom resolver be used to fill in a catalog dataset name? At a glance this would appear to conflict with the dataset factory notation, but I want to make sure.
e
Hi @Galen Seilis, if I’m not mistaken custom resolvers in Kedro are designed to fill in values inside dataset configs (e.g. credentials, filepaths, connection strings), not the dataset name itself. cc @Ankita Katiyar
a
Yeah, the custom resolver in the name of catalog entry doesn’t work but it doesn’t seem to error out either. 🤔 When I use a pre-defined resolver like
runtime_params:
it conflicts with the dataset factory pattern. Makes me wonder that it might be possible to make it work on our end but would be interested to know the use-case for this
thankyou 1
g
Thanks @Elena Khaustova and @Ankita Katiyar! The goal I have behind this question is to have a single source of truth for dataset names, and to facilite LSP-based operations on the code. I find that I'm not a huge fan of having to update names in both the catalog and the strings of names throughout the pipeline files. And it would be nice if these were just Python variables so that LSP-based navigation and refactoring can be easily done. So in my current project I have started using Python variables defined in a separate file for all the dataset names stored as strings. This makes renaming datasets easier. Having the source of truth for dataset names be in a single place as Python variable assignments that are then available in the catalog as resolvers means that renaming datasets only needs to be done in one place. I don't use VSCode, so even if the VSCode plugin does (or could be made to) do LSP operations on dataset names as strings, it would not be of any help to me. A Python-based solution is favourable to an editor-specific solution, but if it is an editor-based solution my choice would be vim/nvim.
And beyond the fact that I myself am not a VSCode user, I would still want an editor-agnostic solution for my team since that affords people the flexibility to use w/e editor they want.