a question on hooks: hooks can be used to modify a...
# questions
p
a question on hooks: hooks can be used to modify a parameter in the catalog? if I look at the signature of hook:
def after_catalog_created(self, catalog: DataCatalog) -> None:
it seems to me there is no way to make some change in the catalog, correct (I can load the parameter but I do not see a way to make a change). This might very well be on purpose (where hooks are only for logging and profiling). My use case (just so I do not follow in the XY problem trap https://en.wikipedia.org/wiki/XY_problem) is that I have a parameter where a default value should be computed starting from the value of another parameter (and this parameter is used in many nodes and I would like not to need to call the change everytime)
h
Someone will reply to you shortly. In the meantime, this might help:
c
Is this right:
param1
is what is set manually in
parameters.yml
, and
param2
is calculated from
param1
? Maybe you could have a node that does
calculation(param1) -> param2
.
param2
could be just a
MemoryDataset
that is passed to downstream nodes.
r
p
Thanks for both answers, using a node or resolvers are both valid options for my use case
👍 1