Icon

How to Modify Database Tables on Snowflake

<p><strong>How to Modify Database Tables on Snowflake</strong></p><p>This workflow demonstrates how write data from KNIME into a Snowflake database, perform in-database data operations, and write processed data into a new database table. The workflow also shows how to read a data sample from the database back into KNIME for further analysis. Lastly, it shows how to remove an existing table from the database and close the database connection</p>

URL: Snowflake Extension Guide | KNIME Documentation https://docs.knime.com/ap/latest/snowflake_extension_guide/#quickstart-with-snowflake-in-knime

Write data from KNIME to a database

Read data sample from database into KNIME

Write data processed on a database to a database

How to Modify Database Tables on Snowflake


This workflow demonstrates how write data from KNIME into a Snowflake database, perform in-database data operations, and write processed data into a new database table. The workflow also shows how to read a data sample from the database back into KNIME for further analysis. Lastly, it shows how to remove an existing table from the database and close the database connection.

Remove a database table

In-database data processing

Close input DB connection

📍Technical Note:

If you don't have a Snowflake account, you can sign up for a free 30-day trial account (when signing up, select Enterprise edition and choose any Snowflake cloud/region - preferably AWS or Azure).

Configure the Snowflake Connector node:

After signing up, navigate to your Snowflake Account details. There, you'll find key information to configure the node:

  • Account identifier (input it in Full account name field)

  • Login name (input it in Authentication > Username & password field). The password field is the password used to log in to your Snowflake account.

  • Role (input it in Default access control role). Make sure the role is ACCOUNTADMIN.

  • Stay in your Account details and navigate to the Config File tab. Select the warehouse you prefer (e.g., SNOWFLAKE_LEARNING_WH, if you're using a free trial account) and input the warehouse name in the Virtual warehouse field.

📍Technical Note:

[For users with a free 30-day trial account] In the DB Writer, DB Writer (DB Data) and DB Table Deleter nodes, keep the default configurations and simply execute the nodes.

[For users with a regular account] In the DB Writer,DB Writer (DB Data) and DB Table Deleter nodes, click on the Browse button and select your preferred Database and Schema names (they must already exist). Make sure the Table name stays as per default configuration.

💡Pro tip: If your working with very large datasets, we recommend replacing the DB Writer node with the DB Table Structure Creator + DB Loader nodes for faster, bulk data loading to database.

Import backto KNIME for furtheranalysis
DB Reader
Global newson Tourism
Table Reader
Change typeString to Local Date Time
DB Type Mapper
Remove existingtable and keep onlypre-processed table
DB Table Deleter
DB Connection Closer
100 rows
DB Row Sampler
Write processed data todatabase
DB Writer (DB Data)
Connect todatabase
Snowflake Connector
Descendsort
DB Sorter
DB Column Renamer
Filter outgeometry column
DB Column Filter
Create a new table and directly insert the data
DB Writer

Nodes

Extensions

Links