hey, i have an `after_context_created` hook called...
# questions
g
hey, i have an
after_context_created
hook called
AzureSecretsHook
that saves some credentials in
context
. Can I use these
credentials
as node inputs?
Copy code
context.config_loader["credentials"] = {
            **context.config_loader["credentials"],
            **adls_creds,
        }
self.credentials = context.config_loader["credentials"]
so far only been able to use it by importing
AzureSecretsHook
and using
AzureSecretsHook.get_creds()
directly in the nodes
Copy code
@staticmethod
    def get_creds():
        return AzureSecretsHook.credentials
l
Gauthier, node inputs need to come from entries registered in the data catalog or from parameters.
👍 1
n
What are you trying to do? The reason this is not directly available in nodes is that when you find yourself needing the credentials as parameters directly, it's likely that should have been a dataset. If you look at the implementation of some of the kedro datasets, you will find this as a pattern.
g
@Nok Lam Chan credentials are originally used in the catalog but due to memory limitations, I sometimes have to create and save intermediate datasets from the node and cleanup memory before going further. simply outputting everything as a partitioned dataset is not realistic. Thinking of a different approach now using delta tables.
👀 1