Ralf Kowatsch
11/13/2025, 8:12 AMElena Khaustova
11/13/2025, 10:38 AMDataset API is designed for pure data I/O: it loads/returns data objects and writes them back, and it isn’t aware of per-node or per-run execution context.
That means:
• The DataCatalog is instantiated once per pipeline run, not per node.
• Datasets are shared across nodes.
• Any state stored inside a dataset (like a Snowpark session) is therefore global to that catalog instance.
If you want one Snowpark session per node, not per pipeline, you need to move session management out of the dataset and into the node level or a hook.
Possible options:
• Create the Snowpark session inside each node - instead of letting the dataset manage it, you can open a session explicitly in the node
• Use a hook to create a session per node - https://docs.kedro.org/en/unreleased/extend/hooks/introduction/
• If you really want to keep session logic in the dataset layer, the clean way is to make the dataset open and close its own Snowpark session each time it’s called