Hello, I don't know if it's the best place for thi...
# data-tricks-and-tips
m
Hello, I don't know if it's the best place for this beginner's question. I've tried to use SnowflakeQuery task and I got
Copy code
NameError: name 'err' is not defined
when I run this line:
Copy code
from prefect.tasks.snowflake import SnowflakeQuery
It leads me to this file
Copy code
/src/prefect/tasks/snowflake/__init__.py
and this is the code from init.py that fails for me:
Copy code
try:
    from prefect.tasks.snowflake.snowflake import (
        SnowflakeQuery,
        SnowflakeQueriesFromFile,
    )
except ImportError:
    raise ImportError(
        'Using `prefect.tasks.snowflake` requires Prefect to be installed with the "snowflake" extra.'
    ) from err
what am I doing wrong? Thank you
1
probably this commit introduced regression, will try to fix it https://github.com/PrefectHQ/prefect/commit/c72096215cf2002e68f8bcdd5a5fa7896d5c1a3b
a
this commit added a new import - seems like the root cause of the issue is you didn't install snowflake extra - can you try this?
Copy code
pip install "prefect[snowflake]"
thanks for contributing a fix to this import error
m
Yeah, after fixing https://github.com/PrefectHQ/prefect/pull/5846 I did install snowflake for prefect and it seems to work
a
nice, thx for the update! 🙌