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/
Transformational technology leader | Author and speaker | Team builder | Experienced public company executive
0
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!
Snowflake makes enterprise AI easy, efficient and trusted. Thousands of companies around the globe, including hundreds of the world’s largest, use Snowflake’s AI Data Cloud to share data, build applic
With over 2.5 million reviews, we can provide the specific details that help you make an informed software buying decision for your business. Finding the right product is important, let us help.
or continue with
LinkedIn
Google
Google (Business)
Gmail.com addresses not permitted. A business domain using Google is allowed.