hi team - trying to load data from the raw folder ...
# questions
n
hi team - trying to load data from the raw folder into a notebook (its defined in my catalog) using
catalog.load("df")
but encounter this error
Copy code
NameError: name 'catalog' is not defined
n
%load_ext kedro.ipython
https://docs.kedro.org/en/stable/notebooks_and_ipython/kedro_and_notebooks.html The
catalog
don't show up magically, behind the scene it's a IPython extension that push that variable to the notebook. So the solution is either you start a notebook with
kedro jupyter notebook
that register this for you. Or if you are just openning a notebook on instance that you cannot control, use
%load_ext kedro.ipython
.
The
kedro jupyter notebook
command launches a notebook with a customised kernel that has been extended to make the following project variables available:
catalog
(type
DataCatalog
): Data Catalog instance that contains all defined datasets; this is a shortcut for
context.catalog
context
(type
KedroContext
): Kedro project context that provides access to Kedro’s library components
pipelines
(type
dict[str, Pipeline]
): Pipelines defined in your pipeline registry
session
(type
KedroSession
): Kedro session that orchestrates a pipeline run
K 1
n
makes sense, thanks!
z
Just to say that I tested today %load_ext kedro.ipython from google vertex ai workbench (wich is hosting jupyterlab) and it works great.
thankyou 1
n
Amazing, thanks for letting us know!