You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Describe the bug
when running dbt python models on snowflake without using pandas, dbt will throw an error
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?The text was updated successfully, but these errors were encountered: