I tried to connect Snowflake using python connector snowflake.connector
.
error:
snowflake.connector.errors.OperationalError: 250003: Failed to get the response. Hanging? method: post, url: https://efa44011.snowflakecomputing.com:443/session/v1/login-request?request_id=306f23d5-8367-4f0c-a2ff-eebeaddc60d2&databaseName=SNOWFLAKE_SAMPLE_DATA&schemaName=TPCH_SF1000&warehouse=COMPUTE_WH&request_guid=1f40e88e-610b-430a-adb5-52c8baed6dbc
Complete Code :
import snowflake.connector
print("Connecting...")
con = snowflake.connector.connect(
user='XXXXXXXX',
password='XXXXXXX',
account = 'efa44011',
warehouse = 'COMPUTE_WH',
database = 'SNOWFLAKE_SAMPLE_DATA',
schema = 'TPCH_SF1000'
)
con.cursor().execute("USE WAREHOUSE " +'COMPUTE_WH')
con.cursor().execute("USE DATABASE " + 'SNOWFLAKE_SAMPLE_DATA')
cs = con.cursor()
try:
cs.execute("SELECT current_version()")
one_row = cs.fetchone()
print(one_row[0])
finally:
cs.close()
con.close()
Thanks in advance