# Snowflake - wie man sich mit NodeJS mit Snowflake verbindet

Hat jemand einen funktionierenden Code, um NodeJS und Snowflake zu verbinden?

Habe versucht, den Anweisungen für NodeJS zu folgen:

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());
  }
});
Bekomme immer wieder Fehler:

Netzwerkfehler. Konnte Snowflake nicht erreichen.
Ähnlich - den Anweisungen für Python zu folgen, funktioniert ohne Probleme (mit GENAU denselben Benutzer/Passwort/Konto usw. wie für 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()

<a class="a a--md" elv="true" href="https://coursedrill.com/snowflake-training/">https://coursedrill.com/snowflake-training/</a>

##### Post Metadata
- Posted at: vor über 4 Jahre
- Net upvotes: 1


## Comments
### Comment 1

you can follow this guide : https://docs.snowflake.com/en/user-guide/nodejs-driver-use.html

##### Comment Metadata
- Posted at: vor etwa 4 Jahre
- Author title: (Serving Notice Period Immediate Joiner) Software Engineer L2 at Gemini Solutions | Python | ETL | Big Data



### Comment 2

Does this help? https://www.ameexusa.com/blogs/connecting-node-js-snowflake

##### Comment Metadata
- Posted at: vor etwa 4 Jahre
- Author title: Transformational technology leader | Author and speaker | Team builder | Experienced public company executive




## Related Product
[Snowflake](https://www.g2.com/de/products/snowflake/reviews)

## Related Category
[Datenlagerhaus](https://www.g2.com/de/categories/data-warehouse)

## Related discussions
- [Wie gut skaliert Trello in ein größeres Team?](https://www.g2.com/de/discussions/1-how-well-does-trello-scale-into-a-larger-team)
  - Posted at: vor fast 13 Jahre
  - Comments: 6
- [Can we please add a new section](https://www.g2.com/de/discussions/2-can-we-please-add-a-new-section)
  - Posted at: vor fast 13 Jahre
  - Comments: 0
- [Quantifizierbare Vorteile durch die Implementierung Ihres CRM](https://www.g2.com/de/discussions/quantifiable-benefits-from-implementing-your-crm)
  - Posted at: vor fast 13 Jahre
  - Comments: 4


