Kedro integration functions
API reference for all Kedro integration functions. The how-to guide on Kedro Data Catalog integration contains more information.
vizro.integrations.kedro
catalog_from_project
Return the Kedro Data Catalog associated to a Kedro project.
Parameters:
-
project_path
(Union[str, Path]
) –Path to the Kedro project root directory.
-
env
(Optional[str]
, default:None
) –Kedro configuration environment to be used. Defaults to "local".
-
extra_params
(Optional[dict[str, Any]]
, default:None
) –Optional dictionary containing extra project parameters for underlying KedroContext. If specified, will update (and therefore take precedence over) the parameters retrieved from the project configuration.
Returns:
-
CatalogProtocol
–A Kedro Data Catalog.
Examples:
>>> from vizro.integrations import kedro as kedro_integration
>>> catalog = kedro_integration.catalog_from_project("/path/to/kedro/project")
Source code in src/vizro/integrations/kedro/_data_manager.py
datasets_from_catalog
Return the Kedro Dataset loading functions associated to a Kedro Data Catalog.
Parameters:
-
catalog
(CatalogProtocol
) –Path to the Kedro project root directory.
-
pipeline
(Pipeline
, default:None
) –Optional Kedro pipeline. If specified, the factory-based Kedro datasets it defines are returned.
Returns:
-
dict[str, pd_DataFrameCallable]
–A dictionary mapping dataset names to Kedro Dataset loading functions.
Examples:
>>> from vizro.integrations import kedro as kedro_integration
>>> dataset_loaders = kedro_integration.datasets_from_catalog(catalog)
Source code in src/vizro/integrations/kedro/_data_manager.py
pipelines_from_project
Return the Kedro Pipelines associated to a Kedro project.
Parameters:
-
project_path
(Union[str, Path]
) –Path to the Kedro project root directory.
Returns:
-
dict[str, Pipeline]
–A dictionary mapping pipeline names to Kedro Pipelines.
Examples:
>>> from vizro.integrations import kedro as kedro_integration
>>> pipelines = kedro_integration.pipelines_from_project("/path/to/kedro/project")