antony.milne
02/02/2022, 10:16 AMbefore_node_run
) then you'll need to make the pipeline name accessible to your hook by saving the relevant information to the class somehow, e.g.
class Hooks:
@hook_impl
def before_pipeline_run(self, run_params: Dict[str, Any]) -> None:
self.pipeline_name = run_params["pipeline_name"]
@hook_impl
def before_node_run(self) -> None:
if self.pipeline_name == "data_science":
# code that only runs when you call `kedro run --pipeline=data_science`