Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Snowflake - How to get started with Snowflake in Automations

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
Ionut_Dumitrascu

Snowflake - How to get started with Snowflake in Automations

Last Update:

Jun 2, 2022 8:09:35 AM

Updated By:

Emile_Koslowski

Created date:

Nov 8, 2021 4:11:22 AM

Note: we've recently (May 25th) released a new version of the Snowflake connector, if you had automations using Snowflake prior to that date, the connector will show as Snowflake - deprecated. To use this new version, simply replace those blocks with blocks from the current Snowflake connector.

This article gives an overview of the available blocks in the Snowflake connector in Qlik Application Automation. It will also go over some basic examples of retrieving data from a Snowflake database and creating a record in a database.

Connector overview

This connector has the following blocks:

  • List Tables: returns a list of the tables from the connected database.
  • List Records: returns a list of records from the specified table
  • Insert Record: create one record in the specified table. 
  • Upsert Record: create or update one record in the specified table. 
  • Insert Bulk: create multiple records in the specified table.
  • Upsert Bulk: create or update multiple records in the specified table.
  • Do Query: do a generic SQL query against the connected Snowflake database.
  • Update Record by One Field: update a single record in the specified table.
  • Delete Record: delete one record in the specified table. 
  • List Schemas: returns a list of schemas from the connected database.

Authentication

To create a new connection to Snowflake, the following parameters are required:

  • account_name -> your snowflake account/tenant name, 'ABC' if you Snowflake URL is  abc.snowflakecomputing.com.
  • username -> username for the user that has remote access to the snowflake database.
  • password -> password used to authenticate the above username
  • dbname -> the name of the database you want to use for this connection. If you want to connect to multiple databases in the same automation, you'll need to create multiple connections.
  • warehouse -> the name of the warehouse you want to use for this connection.

Examples

Insert a new record into a table

  1. Add the Insert Record block from the Snowflake connector to your automation.
  2. Configure the block to point to a table in the database you're currently connected to, feel free to use the do lookup function for this.
    Emile_Koslowski_0-1651240961548.png
  3. Run the automation. This will insert a new record in your Snowflake table.

Use the Do Query block to create a new table

The Do Query block can be used to perform actions in Snowflake that aren't supported by the other blocks. See the below example on creating a new table.

  1. Create a new automation
  2. Search for the Snowflake connector in the left-hand side menu and find the Do Query block. Drag this block inside the automation. Highlight the Do Query block by clicking it and configure it in the right-hand side menu.Emile_Koslowski_0-1651239376264.png
  3. Add your query to create a new table in the Query input field. Here is a query example that creates a table:
    Emile_Koslowski_0-1651239534401.png
  4. Run the automation. This will create a new table with the specified structure within the selected database.

 

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

 

Tags (1)
Labels (2)
Comments
estherl
Partner - Contributor
Partner - Contributor

Does the Snowflake connector in App Automation support other forms of authentication other than username and password? For example OAuth mechanism like we do for a data connection for Qlik app development? Thanks

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @estherl I believe only username and password are currently supported, but let me check in with our experts!

All the best,
Sonja 

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @estherl 

I can now confirm that only username and password are supported as of right now. However, expanding this is on our team's radar, though we do not currently have any guarantee on when that would be added.

All the best,
Sonja 

estherl
Partner - Contributor
Partner - Contributor

Thanks @Sonja_Bauernfeind 

Dalton_Ruer
Support
Support

Just in case this helps anyone else ... If your Snowflake URL happens to contain a location name along with your company name ... be sure to use that whole thing as your Account Name

{Your Name}.us-east-1

If your Snowflake URL is just {Your Name}.snowflakecomputing.com then you are good to go with just your Account name. 

 

Version history
Last update:
‎2022-06-02 08:09 AM
Updated by: