0
votes

I am new to working with snowflake, using the node.js driver found in the snowflake documentation https://docs.snowflake.com/en/user-guide/nodejs-driver-use.html

I was initially creating a connection with the below configurations.

  account: process.env.SNOWFLAKE_ACCOUNT,
  username: process.env.SNOWFLAKE_USERNAME,
  password: process.env.SNOWFLAKE_PASSWORD,
})

However, the connection was dropping, so I added clientSessionKeepAlive: true to the connection config.

So my question is, does adding connection.destroy() after the query effectively disconnects from the server?

Any advice is greatly appreciated. Thank you in advance!

1

1 Answers

0
votes

Yes, a connection can be terminated by calling the connection.destroy() method. This immediately ends the session associated with the connection without waiting for running statements to complete.

See here