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

Use session as context manager in examples #34

Open
sfc-gh-turbaszek opened this issue Feb 19, 2024 · 0 comments
Open

Use session as context manager in examples #34

sfc-gh-turbaszek opened this issue Feb 19, 2024 · 0 comments

Comments

@sfc-gh-turbaszek
Copy link

To align with best practices and to assure that session are really closed in case of errors examples should use snowpakr sesson in the following way:

    with Session.builder.getOrCreate() as session:
        print(main(session, *sys.argv[1:]))  # type: ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant