Created
September 21, 2022 22:36
-
-
Save RHDZMOTA/d2abc4f89fe4391eb00653a8d3f9400c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import snowflake.connector | |
# Create the snowflake connector instance | |
connector_instance = snowflake.connector.connect( | |
user=<your-user>, | |
password=<your-password>, | |
account=<your-snowflake-account>, | |
) | |
# Create a cursor to execute your queries | |
cursor = connector_instance.cursor() | |
try: | |
cursor.execute("<your-query>") | |
first_row = cursor.fetchone() | |
finally: | |
cursor.close() | |
connector_instance.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python requirements: