to_kedro_viz.py
pipeline_to_kedro_viz(nodes, datasets, output_directory)
Convert a pipeline to a kedro-viz static pipeline directory
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nodes
|
set[Node]
|
|
required |
datasets
|
dict[str, Input | Output]
|
dict of name and |
required |
output_directory
|
Path
|
path to write the output data to |
required |
Raises:
Type | Description |
---|---|
FileExistsError
|
if the output directory already exists |
Examples:
>>> from pathlib import Path
>>> from ordeq_viz import (
... gather_ios_from_module,
... gather_nodes_from_registry,
... pipeline_to_kedro_viz
... )
>>> import catalog as catalog_module # doctest: +SKIP
>>> import nodes as nodes_module # doctest: +SKIP
>>> # Gather all nodes in your project:
>>> nodes = gather_nodes_from_registry()
>>> # Find all objects of type "IO" in catalog.py
>>> datasets = gather_ios_from_module(catalog_module) # doctest: +SKIP
>>> pipeline_to_kedro_viz(
... nodes,
... datasets,
... output_directory=Path("kedro-pipeline-example/")
... ) # doctest: +SKIP
Run with:
export KEDRO_DISABLE_TELEMETRY=true
kedro viz run --load-file kedro-pipeline-example