Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kedro-datasets: Session management in SnowparkTableDataset when only credentials is passed #972

Open
gozderam opened this issue Dec 23, 2024 · 0 comments
Labels
Community Issue/PR opened by the open-source community

Comments

@gozderam
Copy link

Description

The session is not correctly activated in SnowparkTableDataset. If the dataset is created with credentials (session is not passed to the constructor), the _session attribute of SnowparkTableDataset is not set, which results in DatasetError: No active session. Please initialise a Snowpark session before loading data. while trying to load/save data. Shouldn't session property be used in loading/saving methods instead of _session? The current behaviour was introduced in this commit: 59dcf50#diff-93abe0549a1ccefcf14c67b5417fdca1c87f55f06bf66e674792dd541aca960eR177

Context

The session is not correctly managed while passing only credentials (no session) to SnowparkTableDataset constructor -> can't load/save data.

Steps to Reproduce

  1. Create SnowparkTableDataset passing only credentials (not session)
  2. Trying to load/save data

Expected Result

_get_session method is invoked in SnowparkTableDataset and data can be saved/loaded.

Actual Result

Error saying session is not initialised.

DatasetError: No active session. Please initialise a Snowpark session before loading data.

Your Environment

  • Kedro version: 0.19.10
  • Kedro datasets version: 6.0.0
  • Python version: 3.11.10
  • Operating system and version: macOC Sonoma 14.4
@merelcht merelcht added the Community Issue/PR opened by the open-source community label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Issue/PR opened by the open-source community
Projects
None yet
Development

No branches or pull requests

2 participants