class documentation

class PipelineSpecs: (source)

View In Hierarchy

Namespace that defines all specifications for a pipeline's lifecycle hooks.

Method after_pipeline_run Hook to be invoked after a pipeline runs.
Method before_pipeline_run Hook to be invoked before a pipeline runs.
Method on_pipeline_error Hook to be invoked if a pipeline run throws an uncaught Exception. The signature of this error hook should match the signature of before_pipeline_run along with the error that was raised.
@hook_spec
def after_pipeline_run(self, run_params: Dict[str, Any], run_result: Dict[str, Any], pipeline: Pipeline, catalog: DataCatalog): (source)

Hook to be invoked after a pipeline runs.

Parameters
run_params:Dict[str, Any]

The params used to run the pipeline. Should have the following schema:

{
  "session_id": str
  "project_path": str,
  "env": str,
  "kedro_version": str,
  "tags": Optional[List[str]],
  "from_nodes": Optional[List[str]],
  "to_nodes": Optional[List[str]],
  "node_names": Optional[List[str]],
  "from_inputs": Optional[List[str]],
  "to_outputs": Optional[List[str]],
  "load_versions": Optional[List[str]],
  "pipeline_name": str,
  "extra_params": Optional[Dict[str, Any]]
}
run_result:Dict[str, Any]The output of Pipeline run.
pipeline:PipelineThe Pipeline that was run.
catalog:DataCatalogThe DataCatalog used during the run.
@hook_spec
def before_pipeline_run(self, run_params: Dict[str, Any], pipeline: Pipeline, catalog: DataCatalog): (source)

Hook to be invoked before a pipeline runs.

Parameters
run_params:Dict[str, Any]

The params used to run the pipeline. Should have the following schema:

{
  "session_id": str
  "project_path": str,
  "env": str,
  "kedro_version": str,
  "tags": Optional[List[str]],
  "from_nodes": Optional[List[str]],
  "to_nodes": Optional[List[str]],
  "node_names": Optional[List[str]],
  "from_inputs": Optional[List[str]],
  "to_outputs": Optional[List[str]],
  "load_versions": Optional[List[str]],
  "pipeline_name": str,
  "extra_params": Optional[Dict[str, Any]]
}
pipeline:PipelineThe Pipeline that will be run.
catalog:DataCatalogThe DataCatalog to be used during the run.
@hook_spec
def on_pipeline_error(self, error: Exception, run_params: Dict[str, Any], pipeline: Pipeline, catalog: DataCatalog): (source)

Hook to be invoked if a pipeline run throws an uncaught Exception. The signature of this error hook should match the signature of before_pipeline_run along with the error that was raised.

Parameters
error:ExceptionThe uncaught exception thrown during the pipeline run.
run_params:Dict[str, Any]

The params used to run the pipeline. Should have the following schema:

{
  "session_id": str
  "project_path": str,
  "env": str,
  "kedro_version": str,
  "tags": Optional[List[str]],
  "from_nodes": Optional[List[str]],
  "to_nodes": Optional[List[str]],
  "node_names": Optional[List[str]],
  "from_inputs": Optional[List[str]],
  "to_outputs": Optional[List[str]],
  "load_versions": Optional[List[str]],
  "pipeline_name": str,
  "extra_params": Optional[Dict[str, Any]]
}
pipeline:PipelineThe Pipeline that will was run.
catalog:DataCatalogThe DataCatalog used during the run.