有没有人有连接 NodeJS 和 Snowflake 的工作代码。为 NodeJS尝试了以下说明:var snowflake = require('snowflake-sdk');var connection = snowflake.createConnection({ account: 'account1', username: 'user1', password: 'pass1', region: 'us-east-1'});connection.connect(function(err, conn) { if (err) { console.error('Unable to connect: ' + err.message); } else { console.log('Successfully connected as id: ' + connection.getId()); }});不断收到错误:Network error. Could not reach Snowflake.类似地 - 以下Python 说明可以正常工作(使用与 NodeJS 完全相同的用户/密码/帐户等):import snowflake.connectorctx = snowflake.connector.connect( user='user1', password='pass1', account='account1')print ("SELECT current_version():")cs = ctx.cursor()try: cs.execute("SELECT current_version()") one = cs.fetchone() print(one[0]) # 2.50.2finally: cs.close()
添加回答
举报
0/150
提交
取消