Snowflake
18 min
the snowflake connector enables automated interactions with the snowflake data cloud, allowing users to perform sql queries and manage data within their security operations workflows snowflake is a cloud based data warehousing platform that enables scalable, secure, and easy to use data storage and analytics the snowflake connector for swimlane turbine allows users to execute sql queries, insert data, and run stored procedures directly within the swimlane platform this integration empowers security teams to automate data analysis and response workflows, enhancing their ability to quickly access and act upon security data by leveraging snowflake's powerful data processing capabilities, users can streamline their security operations and gain valuable insights from their data without the need for complex coding prerequisites to utilize the snowflake connector with swimlane turbine, ensure you have the following prerequisites basic authentication with these parameters account the unique identifier for your snowflake account username your snowflake user login name password your snowflake account password key pair authentication with these parameters rsa key base64 your base64 encoded rsa private key rsa password the passphrase for your rsa private key, if applicable account the unique identifier for your snowflake account username your snowflake user login name capabilities this connector provides the following capabilities run read only query run modification query run stored procedure action setup the action "run query" allows inputs to be passed as wild cards any "%s" present will be replaced, in order, with supplied "parameters" example query = "select id from person where id = %s or id < %s" parameters = \["10","20"] the following query will be executed "select id from person where id = 10 or id < 20" when executing a stored procedure, it is important to add the parenthesis to the end of the procedure name example sp get history() or sp get history(%s, %s) configurations snowflake basic auth authenticating using username and password configuration parameters parameter description type required account account name without the @snowflakecomputing com string required user username to connect to the database string required password password string required database name of the database string optional warehouse name of the database string optional schema name of the database string optional role role in use on snowflake string optional login timeout login timeout in seconds used while authenticating number optional network timeout network timeout used for general purpose number optional proxy host proxy host string optional proxy port proxy port number optional proxy user proxy user string optional proxy password proxy password string optional snowflake key pair auth authenticating using username and password configuration parameters parameter description type required private key file base64 rsa key in base64 format string required private key file pwd rsa password string required account account name without the @snowflakecomputing com string required user username to connect to the database string required password password string optional database name of the database string optional warehouse name of the database string optional schema name of the database string optional role role in use on snowflake string optional login timeout login timeout in seconds used while authenticating number optional network timeout network timeout used for general purpose number optional proxy host proxy host string optional proxy port proxy port number optional proxy user proxy user string optional proxy password proxy password string optional actions run modification query executes a non returning modification query, such as insert, on the snowflake database input argument name type required description query string required query using parameters is acceptable ('select from foo where id = %s or id = %s') parameters need to be supplied through the parameter input in order parameters array optional a list of parameters should be in order output parameter type description result string result of the operation query string output field query row count number count value example \[ { "result" "success", "query" "insert into example1 values (2, 'bob');", "row count" 1 } ] run read only query executes a specified sql query in snowflake and returns the results, suitable for information retrieval operations like select input argument name type required description query string required query using parameters is acceptable ('select from foo where id = %s or id = %s') parameters need to be supplied through the parameter input in order parameters array optional a list of parameters should be in order to csv boolean optional when true, returns a csv as an attachment output parameter type description data array response data query string output field query row count number count value columns array output field columns file object attachments file string output field file file name string name of the resource example \[ { "data" \[], "query" "select from customer limit 10;", "row count" 10, "columns" \[] } ] run stored procedure executes a specified stored procedure in snowflake and retrieves the resulting data input argument name type required description stored procedure string required name of the stored procedure to run parameters array optional a list of parameters should be in order to csv boolean optional when true, returns a csv as an attachment output parameter type description data array response data query string output field query row count number count value columns array output field columns file object attachments file string output field file file name string name of the resource example \[ { "data" \[], "query" "select from customer limit 10;", "row count" 10, "columns" \[] } ]