From whare i can get the accessURL of snowflake account as I have to connect to the account from node.js backend with SDK

const snowflake = require('snowflake-sdk');

const connectSnowflake = function (account, username, password) {

    const connection = snowflake.createConnection({

        // account: account,

        username: username,

        password: password,
        accessUrl: account

    });

    connection.connect((err, conn) => {

        if (err) {
            return false;
        } else {
            return true;
        }

    });
}

I have this code to connect snowflake when i pass the value to account that is account id it works and connect to snowflake server but i have a requirement to connect using account url which i think i can pass in accessUrl i read from this but when pass https://someguid.north-europe.azure.snowflakecomputing.com it does not works and give exception in sdk
`D:\snowflake\node\node_modules\snowflake-sdk\lib\connection\connection.js:199
if (connectionConfig.host.endsWith(PRIVATELINK_URL_SUFFIX)) {

node version i am using is 18.17.0

  • In account: account you should put something like this account: someguid.north-europe.azure if it’s just a regular Snowflake account, if it’s a Privatelink one then your account name will also contain the privatelink. The idea is that account name is the part of the URL before .snowflakecomputing.com.

    – 

  • @Sergiu as I have described if we pass account: xxxxxxx-yyyyyyy it works and connects but my requirement is that admin will invite the users and users will connect to the server with their link is it possible in some scenario as the user will have the link in this format someguid.north-europe.azure.snowflakecomputing.com ?

    – 

  • I am not sure if I understand the context well. When you say admin will invite users, what does this means? How are the users connecting to Snowflake, using a NodeJS app or where are they putting the URL? I also don’t understand what you mean by user having the link in that format.

    – 

Leave a Comment