snowflake-connector-net | Snowflake Connector for .NET | SQL Database library
kandi X-RAY | snowflake-connector-net Summary
kandi X-RAY | snowflake-connector-net Summary
The Snowflake .NET connector supports most core functionality. Currently, the PUT and GET commands are not supported. All other query types are supported. Library target is under .NET Framework 4.7.2 and .NET Standard 2.0. Please refer to the Notice section below for information about safe usage of the .NET Driver.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of snowflake-connector-net
snowflake-connector-net Key Features
snowflake-connector-net Examples and Code Snippets
Community Discussions
Trending Discussions on snowflake-connector-net
QUESTION
I'm trying to connect to our Snowflake DB using SSO with the ff connection string but keeps on getting an error. I'm using https://github.com/snowflakedb/snowflake-connector-net for my .NET 4.6.1 console application just to test things out. I have confirmed that my SSO is able to login to the Snowflake Web UI. Found related docs: https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-use.html#native-sso-okta-only
connection string:
AUTHENTICATOR=https://{okta_account_name}.okta.com;ACCOUNT={org}.{region};HOST={org}.{region}.snowflakecomputing.com;PORT=443;ROLE={role};WAREHOUSE={warehouse};USER={sso email};password={sso password};DB={db};SCHEMA={schema}
error:
Exception: Error: Connection string is invalid: Unable to connect SqlState: 08006, VendorCode: 270008, QueryId:
ANSWER
Answered 2021-Aug-12 at 07:02Maybe I posted a question too soon. Following the Readme.md for Snowflake Dotnet Connector, I was able to generate the logs thru log4net. The underlying exception was
QUESTION
I'm using https://github.com/snowflakedb/snowflake-connector-net to connect to and query our Snowflake instance. We currently have a vanity url setup for Snowflake so that we can go to https://X.snowflakecomputing.com/
to access the Console.
I have been using X.snowflakecomputing.com
as the Host part of my connection string (https://github.com/snowflakedb/snowflake-connector-net#create-a-connection).
Does anyone know if this is okay or should I always be using the full {account}.{region}.snowflakecomputing.com
as my Host?
ANSWER
Answered 2021-Apr-30 at 06:19From documentation:
Where are Account Identifiers Used
Account identifiers are required in Snowflake wherever you need to specify the account you are using, including:
- URLs for accessing any of the Snowflake web interfaces.
- SnowSQL, drivers, connectors, and other clients for connecting to Snowflake.
- 3rd-party applications and services that comprise the Snowflake ecosystem.
- Features for securing Snowflake internal operations and communication/interaction with external systems. Global features such as Secure Data Sharing and Database Replication and Failover/Failback.
For example, the URL for an account uses the following format:
QUESTION
Regarding the snowflake .NET connector: https://github.com/snowflakedb/snowflake-connector-net, I can find nothing in the documentation or source code to suggest that connection pooling is supported, and because the connection itself is backed by HttpClient
, and we know that HttpClient
should be reused rather than created/disposed constantly, what's the best way to use the snowflake .NET connector when you'll be making many queries across threads?
Note: I'm not planning on changing any properties of the connection once it's created (schema, database, etc.).
For example:
...ANSWER
Answered 2021-Mar-15 at 19:47Summary from GitHub: The connector is thread safe.
As long as you do not use any session variables in your snowflake code, you can have multiple threads sharing the same SnowflakeDbConnection. It does not matter if you are reusing threads or if you are creating new threads all the time.
Even if you are constantly creating and disposing connections from multiple different threads, a single HttpClient is created once and then reused and shared by all connections.
https://github.com/snowflakedb/snowflake-connector-net/issues/275
QUESTION
I'm using SSRS (SQL Server reporting services) to display reports, my datasource is Snowflake
I have installed the ODBC snowflake driver and configured it properly Click here to view the ODBC configuration
I have created a shared datasource on the SSRS server (via Report manager) and put in my own credentials and the connection works fine Click here to view the connection on the SSRS Server
I'm able to build the SSRS report without any issues, when I run the report, everything works fine, I can publish the report on the server and the report renders perfectly fine on the browser
The issue is when i go back to the report the next day, i'm presented with an error:
An error has occurred during report processing. (rsProcessingAborted) Query execution failed for dataset 'insert_name_of_my_dataset_here'. (rsErrorExecutingCommand)
ERROR [57P03] No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
So, this also means that the following doesn't work neither:
- Subscriptions
- Cache refresh
- Snapshots
The only thing that works is if I open my report in SSRS Report builder, I right-click EACH of my datasets ("each" is very important, it doesn't work if i don't do all of them), I run the queries manually for each of them, and then the "connection" or "session" is "re-activated" and the report runs fine, both locally AND on the server...note i do not have to re-publish the report on the server for it to run
Click here to view screenshots of my process
Steps I have taken to addresss the issue (that didn't yield any resolution):
- I have tried putting the "use warehouse WAREHOUSE_NAME;" command before each dataset's SQL script, but Snowflake's API doesn't allow multiple SQL commands to be sent, so I already saw that this functionality was in the development pipeline for Snowflake and found this link: https://github.com/snowflakedb/snowflake-connector-net/issues/33 - this work was started in 2018 and the last update dates from Apr 2019 that says they are starting to address the JDBC driver...no mention for the ODBC driver yet
- I have set the snowflake parameter client-session-keep-alive to true (https://docs.snowflake.com/en/sql-reference/parameters.html#client-session-keep-alive), but according to the community portal: A similar "keep alive" parameter is not currently available for the ODBC driver. Instead, you could issue a dummy query every few hours to keep the connection alive. (https://community.snowflake.com/s/article/faq-how-long-can-my-jdbcodbc-connection-remain-idle)
- List item
- I have tried to create a cache refresh plan or a snapshot schedule that creates a snapshot or caches the report every 3 hours, and it works for the first schedule, but fails with the error for the other ones
- The only thing I didn't try is to have snowflake never close the connection and keep the warehouse in the "started" state indefinitely...but this would increase my cost, and i'm pretty sure it won't work since the session would end anyways after 4 hours...
Any assistance is welcome!
Thanks
Specs:
- SSRS 2014
- Snowflake X-small
- ODBC-64 bit driver, installed from the snowflake driver repository (tested with 32-bit also, but 64-bit is the one that is visible to SSRS)
ANSWER
Answered 2020-Jun-09 at 13:20Could it be related with the data warehouse name (in the ODBC settings)? Is there a typo? COSNUMER_WH or CONSUMER_WH?
QUESTION
I am working on a new Project and requirement of the project is to design an API endpoint that connects with Snowflake using .NET Core
As I am new to the Snowflake, I referred to the sample application provided by Microsoft in GitHub Link. As per the link, Snowflake is supported only in VS2017 and .NET Framework version. Will t supports in .NET Core as well?
I am trying to connect to Snowflake using HttpClient as below:
...ANSWER
Answered 2020-May-27 at 08:04Found something here https://www.c-sharpcorner.com/article/snowflake-with-c-sharp-net-core/
It has step by step guide for .net core.
in the post they are using the connection string, so make sure you have connection string.
hope this helps.
Edit 1
the one you are using, it supports .net standard and all the .net core application supports .net standard.
QUESTION
I am trying to connect to Snowflake via azure function app. Following is the code snippet (ref: https://github.com/snowflakedb/snowflake-connector-net#create-a-connection ) I am using:
ANSWER
Answered 2020-Feb-12 at 20:42Account name is string
including cloud region
ending at snowflakecomputing.com
In your example:
: account.east-us-2.azure
Hope this helps.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install snowflake-connector-net
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page