https://prefect.io logo
b

Brian

07/24/2023, 6:32 PM
Hi all, I am trying to save a pandas dataframe to a snowflake table using the docs provided here I'm encountering an issue with this block of code
Copy code
with connector.cursor() as cursor:
            cursor.execute(statement)
The error I get is
Copy code
AttributeError: 'SnowflakeConnector' object has no attribute 'cursor'
Based on what I see in the prefect docs it does indeed seem like there is no
cursor
attribute. Have I missed something or is there an alternative way to writing a dataframe to Snowflake?
n

Nate

07/24/2023, 6:36 PM
hi @Brian - i think you're trying to get the cursor from the
connector
instead of the
connection
object take a look at the implementation of the
snowflake_query
task
👍 1
b

Brian

07/24/2023, 6:44 PM
Thanks @Nate, that solved my issue