I am working on a scenario where I will have to do some ETL-like operations in Python where the database is Snowflake. I am new to Python and after installing the pip for the Python and Snowflake connector, I am trying to run a simple code for doing a select * from a table. I added bits and pieces of code from various sources with a view to understand how the process works. I am getting the below error and unfortunately am not able to find anything conclusive online.
Error:
OperationalError: 250003: Failed to get the response. Hanging? method: post, url: https://nq13914.southeast-asia.snowflakecomputing.com:443/session/v1/login-request?request_id=7325eb5e-eec6-4ec9-976a-6dbd00852fc3&databaseName=util_db&schemaName=public&warehouse=compute_wh&request_guid=4674d312-5cfd-4944-a8db-7dda073b7b44
Code:
import snowflake.connector as sf
import pandas
ctx = sf.connect (
user = 'floatinginthecloud89',
password = '',
account = 'nq13914.southeast-asia',
warehouse = 'compute_wh',
database = 'util_db',
schema = 'public'
)
print("Got the context object")
cs = ctx.cursor()
print("Got the cursor object")
try:
cs.execute("select * from util_db.public.qwerty1;")
df = cs.fetch_pandas_all()
df.info()
print("__________")
print(df.to_string())
finally:
cs.close()
ctx.close()