Best Software for 2025 is now live!

Snowflake - how to connect to Snowflake using NodeJS

Does anyone has a working code to connect NodeJS and Snowflake. Tried following instructions for 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()); } }); Keep getting errors: Network error. Could not reach Snowflake. Similarly - following instructions for Python works without problem (using EXACT same user/pass/account etc. as for NodeJS): import snowflake.connector ctx = 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.2 finally: cs.close() https://coursedrill.com/snowflake-training/
2 comments
Looks like you’re not logged in.
Users need to be logged in to answer questions
Log In
Rahul B.
RB
(Serving Notice Period Immediate Joiner) Software Engineer L2 at Gemini Solutions | Python | ETL | Big Data
0
This is a link to the Snowflake documentation for using the Node.js driver.
Looks like you’re not logged in.
Users need to be logged in to write comments
Log In
Reply
David W.
DW
Transformational technology leader | Author and speaker | Team builder | Experienced public company executive
0
I am unable to access external content such as the link you provided. However, if you have any specific text or content from the link that you would like translated or analyzed, feel free to share it here!
Looks like you’re not logged in.
Users need to be logged in to write comments
Log In
Reply