I currently am trying to print the output of a snowflake connector query and write it to csv, but I'm having issues doing this. Currently, my code example looks like:
query = '''SELECT TOP 10 * FROM TABLE;'''
conn = snowflake.connector.connect(user='XXXX',
password='XXXX',
account='XXXX')
query_output = conn.cursor().execute(query)
Is there a way for me to print the output of the query, like maybe print(query_output) and then also write it to csv like query_output.to_csv(path)?