Skip to content

SNOW-1993648: Enable performing custom Snowflake REST API requests using the session created by the connector #1119

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

Closed
mhinkka opened this issue Mar 19, 2025 · 2 comments
Assignees
Labels
feature status-triage_done Initial triage done, will be further handled by the driver team wontfix

Comments

@mhinkka
Copy link

mhinkka commented Mar 19, 2025

What is the current behavior?

There is no way to perform custom requests, such as Cortex Agents related calls using snowflake-connector-net.

What is the desired behavior?

It would be nice to be able to use REST APIs provided by Snowflake using the Snowflake session created by snowflake-connector-net. E.g., something like this:

var connection = new SnowflakeDbConnection(connectionString);
connection.Open();

connection.SendSnowflakeApiRequest(
"POST", // method
API_ENDPOINT, // path
{}, // headers
{}, // params
payload, // body
None, // request_guid
API_TIMEOUT // timeout in milliseconds,
);

This example code is based on the Cortex Analyst related Python-example from Snowflake-Labs.

As seen in this example code, similar function (_snowflake.send_snow_api_request) is already provided by Snowpark.

How would this improve snowflake-connector-net?

Enables using snowflake-connector-net also for calling Snowflake REST API functionalities which aren't reachable with plain SQL queries. Currently using API functions requires quite a lot of setup for creating and managing sessions etc.

References, Other Background

Cortex Agents REST API
Cortex Analyst REST API
Cortex Analyst related Python-example from Snowflake-Labs

@github-actions github-actions bot changed the title Enable performing custom Snowflake REST API requests using the session created by the connector SNOW-1993648: Enable performing custom Snowflake REST API requests using the session created by the connector Mar 19, 2025
@sfc-gh-dszmolka
Copy link
Contributor

hello - thank you for submitting this enhancement request. To my current knowledge, there's no plans for implementing such a capability into the Snowflake .NET driver.

If you're already a Snowflake customer, please reach out to your Snowflake Sales representative and let them know of this requirement. They can help with prioritization and getting it implemented.

Also of course since this is an open-sourced library, if there's possibility for you to contribute the change, that is more than welcome and highly appreciated!

@sfc-gh-dszmolka
Copy link
Contributor

For now, i'm closing this Issue but if the demand is high; everyone who needs this: please let your Snowflake Sales representative know ! (or, comment/react here)

@sfc-gh-dszmolka sfc-gh-dszmolka closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Mar 19, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka added wontfix status-triage_done Initial triage done, will be further handled by the driver team labels Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature status-triage_done Initial triage done, will be further handled by the driver team wontfix
Projects
None yet
Development

No branches or pull requests

2 participants