Snowflake

Frends.Snowflake.ExecuteQuery / 2.0.0

Summary

Runs SQL against Snowflake, returning rows or an affected count depending on the statement, and authenticates with a key pair as well as by password.

Typical use — reading from and writing to Snowflake; key-pair authentication is the option that avoids a password in configuration

Details

Frends version
5.5 and newer
Agent
Crossplatform
Target framework
net6.0

Connection and command parameters.

Name Type Default Example Description
ConnectionStringSecret String account=testaccount-123;user=user;role=ACCOUNTADMIN;db=SHOP;schema=PUBLIC; authenticator=SNOWFLAKE_JWT;private_key_file=C:/snow/rsa_key.p8;private_key_pwd=MyStrongPassphrase

String that contains the necessary data to connect to the database.

CommandType CommandTypes

Specifies how a command string is interpreted. ExecuteNonQuery: Executes an SQL statement, and returns the number of rows affected. ExecuteReader: Executes the query, and returns an object that can iterate over the entire result set. ExecuteScalar: Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

Possible values:

  • ExecuteNonQuery: Executes an SQL statement, and returns the number of rows affected.

  • ExecuteReader: Executes the query, and returns an object that can iterate over the entire result set.

  • ExecuteScalar: Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

CommandText String SELECT * FROM mytable

text command to run against the data source.

PrivateKeyFilePath String C:\keys\rsa_key.p8

Full file path to the private key (.p8) used for Snowflake key pair authentication.

PrivateKeyPassphraseSecret String MySuperSecret123

Optional passphrase for the private key file, if the key was generated with encryption. Leave empty if the key file is unencrypted.

An unhandled error has occurred. Reload 🗙