Skip to content

Incorrect logic to map snowcli to snowpark connection params #25

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

Open
Peeyush-Now opened this issue Oct 16, 2023 · 2 comments
Open

Incorrect logic to map snowcli to snowpark connection params #25

Peeyush-Now opened this issue Oct 16, 2023 · 2 comments

Comments

@Peeyush-Now
Copy link

Inside utils/snowpark_utils.py

THIS WILL NOT WORK AS THE KEYS BETWEEN SNOWCLI AND SNOWPARK ARE DIFFERENT!!

    # Convert snowsql connection variable names to snowcli ones
    # session_config_dict = {
    #     snowsql_to_snowpark_config_mapping[k]: v.strip('"')
    #     for k, v in session_config.items()
    # }

WE NEED TO IETRATE OVER BOTH DICTIONARIES AT THE SAME TIME

    session_config_dict = {}
    for (k1,v1), (k2,v2) in zip(snowsql_to_snowpark_config_mapping.items(), session_config.items()):
        session_config_dict[k1] = v2.strip('"')

Also, inside steps/02_load_raw.py

perhaps make this more foolproof

  # current_dir = os.getcwd()
  current_dir = os.path.dirname(os.path.abspath(__file__))
@Peeyush-Now
Copy link
Author

Sorry about the CAPS!!

@impawan
Copy link

impawan commented Dec 7, 2023

I was facing issue related to path, thanks @Peeyush-Now this worked for me

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

2 participants