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

[CT-1017] No module named 'pandas' for python models #228

Closed
ChenyuLInx opened this issue Aug 9, 2022 · 0 comments · Fixed by #229
Closed

[CT-1017] No module named 'pandas' for python models #228

ChenyuLInx opened this issue Aug 9, 2022 · 0 comments · Fixed by #229
Assignees
Labels
bug Something isn't working python_models

Comments

@ChenyuLInx
Copy link
Contributor

ChenyuLInx commented Aug 9, 2022

Describe the bug

when running dbt python models on snowflake without using pandas, dbt will throw an error

13:09:39    ModuleNotFoundError: No module named 'pandas'
13:09:39     in function PYTHON_MODEL__DBT_SP with handler main

This is because in materialization code we use pandas to determine whether the returned dataframe is a snowpark dataframe or a pandas dataframe, and do slightly different things based on that

Steps To Reproduce

Run a python model without specify pandas as part of the package

Expected behavior

Everything works just fine.

Solution

Always add pandas as the required dependencies.
This means each user will have to agree the anaconda policy on snowflake.

Other comment

one really odd thing is that we have a basic python model test(written in core, inhereted in dbt-snowflake) that run things in this way on our testing snowflake account, and doesn't run into the same issue. maybe we added pandas as a global library there?

@ChenyuLInx ChenyuLInx added bug Something isn't working triage python_models and removed triage labels Aug 9, 2022
@ChenyuLInx ChenyuLInx self-assigned this Aug 9, 2022
@github-actions github-actions bot changed the title No module named 'pandas' for python models [CT-1017] No module named 'pandas' for python models Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python_models
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant