You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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();
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.
github-actionsbot
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
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!
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)
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
The text was updated successfully, but these errors were encountered: