Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-973185: deno runtime support #701

Closed
yassun7010 opened this issue Nov 17, 2023 · 1 comment
Closed

SNOW-973185: deno runtime support #701

yassun7010 opened this issue Nov 17, 2023 · 1 comment
Assignees

Comments

@yassun7010
Copy link

yassun7010 commented Nov 17, 2023

Hi ✋

I'm try to make AI Chatbot by using Slack CLI.

To make prompt text, we want to use Snowflake as data source, but we cannot call snowflake-sdk on deno runtime.

My sample code is here.

import snowflake from "npm:[email protected]";

let connection = snowflake.createConnection({
    account: "*************",
    username: "*************",
    password: "*************",
    database: '*************',
    warehouse: '*************',
    role: '*************',
});

connection.connect((err: any, conn: any) => {
    if (err) {
        console.error('Unable to connect: ' + err.message);
    } else {
        console.log('Successfully connected to Snowflake.');
      conn.execute({
        sqlText: 'SELECT 1',
        complete: (err: any, stmt: any, rows: any) => {
          for (const row of rows || []) {
            console.log(row);
          }
        }
      });
    }
});

and the following error occurs.

error: Uncaught TypeError: Class constructor Agent cannot be invoked without 'new'
    at HttpsOcspAgent (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/agent/https_ocsp_agent.js:19:26)
    at createAgent (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/http/node.js:53:19)
    at getFromCacheOrCreate (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/http/node.js:63:13)
    at NodeHttpClient.getAgent (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/http/node.js:115:15)
    at NodeHttpClient.prepareRequestOptions (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/http/base.js:239:22)
    at NodeHttpClient.HttpClient.request (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/http/base.js:39:48)
    at sendHttpRequest (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/services/sf.js:722:23)
    at UnauthenticatedRequest.StateAbstract.Request.send (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/services/sf.js:779:5)
    at sendRequest (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/services/sf.js:1279:13)
    at StateConnecting.continue (file:///Users/username/Library/Caches/deno/npm/registry.npmjs.org/snowflake-sdk/1.9.1/lib/services/sf.js:1281:3)

This sample code can success on Node.js runtime.

Do you plan to support deno in the future?

I want it very much.

@github-actions github-actions bot changed the title deno runtime support SNOW-973185: deno runtime support Nov 17, 2023
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Nov 17, 2023
@sfc-gh-dszmolka
Copy link
Collaborator

hi there 👋 i don't see deno runtime support plans anywhere on the roadmap at this moment for the Snowflake Node.JS driver. of course if our customers/users require it, this might change at any time, but for the foreseeable future i don't see it planned.

best way to proceed with this request (also putting it here for future readers) if you're already a Snowflake customer, please reach out to your account team and tell them how important the feature would be for you and they can help putting it on the roadmap and prioritize for the team.

since there's no plans whatsoever at the very moment of writing to support it, i'm marking this issue as closed.

@sfc-gh-dszmolka sfc-gh-dszmolka closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants