You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use hook methods to log events to external systems and use project configuration to do so.
Context
Currently, method before_pipeline_run receives arguments: run_params: Dict[str, Any], pipeline: Pipeline, catalog: DataCatalog.
None of these, allow me to access credentials nor project parameters required to access external services.
Possible Implementation
Pass entire configuration to hook methods.
EDIT*:
I see I could achieve what I want by making hooks a @property in ProjectContext, but it feels a bit hacky since it depends on the initialization order in KedroContext.__init__:
class ProjectContext(KedroContext):
@property
def hooks(self):
return [MyHook(s3_client(self.config_loader)]
mnowotnik
changed the title
Support creating pipeline-wide object instances to use in hooks
Support creating globally accessible object registry to use in hooks
Oct 14, 2020
mnowotnik
changed the title
Support creating globally accessible object registry to use in hooks
Make configuration more accessible to hook methods
Oct 14, 2020
Description
I would like to use hook methods to log events to external systems and use project configuration to do so.
Context
Currently, method
before_pipeline_run
receives arguments:run_params: Dict[str, Any], pipeline: Pipeline, catalog: DataCatalog
.None of these, allow me to access credentials nor project parameters required to access external services.
Possible Implementation
Pass entire configuration to hook methods.
EDIT*:
I see I could achieve what I want by making hooks a
@property
inProjectContext
, but it feels a bit hacky since it depends on the initialization order inKedroContext.__init__
:However, there are possible problems with this approach: https://waylonwalker.com/blog/whats-new-in-kedro-0164#careful-with-the-singletons
The text was updated successfully, but these errors were encountered: