How to implement snowflake integration with Mendix and send upsert query. - Mendix Forum

How to implement snowflake integration with Mendix and send upsert query.

4

How to implement snowflake integration with Mendix and send upsert query.

Step1.: — Download snowflake connector from Mendix Marketplace, minimum 9.24.16 Mendix version is required to use this module.

Get the snowflake connection details from snowflake support team with given details.

Account name

Authentication method

User

Private Key File Name

Private Key File

Private key password

Role

Database

Schema

Warehouse

Step2: — Add the overview page in your application menu and configure the snowflake connection. Test the same in local run before moving into higher instance.

 

From configuration page create new button to test the snowflake connection.

Define the constant query to test the snowflake connection.

Call the button to TEST snowflake connection from UI using below microflow.

Define the constant query to test the snowflake connection.

TEST snowflake connection from UI. You will get successfully connection message.

Create a scheduler to send mendix data into snowflake, based upon your application business requirement you can extract data and send it to snowflake.

Below is upsert query sample to insert/update data in snowflake.

=========================

MERGE INTO DEV_MENDIX.STAGING.TEST   AS target USING ( SELECT '2025' AS FY, 'z00abc' AS GID, 'raju p' AS  ENGINEER, 'MR.ABC D' AS SUPERVISOR  )AS source ON ( DEV_MENDIX.STAGING.TEST.FY = source.FY)WHEN MATCHED THEN UPDATE SET SALESENGINEERSUPERVISOR = 'Willi D', BOOKINGGOAL = 100000,  RATUSBOOKINGGOAL = 0, CPCBOOKINGGOAL = 50000, EABOOKINGGOAL = 0, RUSSELECTRICBOOKINGGOAL = 0,RSSBOOKINGGOAL = 0WHEN NOT MATCHED THEN  INSERT INTO DEV_MENDIX.STAGING.TEST VALUES ('2025', 'Z004EAKT', 'raju p', 'Willi D','0211480159', 'LTT ASSOCIATES INC', 100000, 0, 50000, 0, 0, 0, 0, 0); 

=======================================================

Posted
4 comments

Good morning Raju!

 

First, thanks for sharing this connector. I'm trying to create a connection to SnowFlake for a test and I want to know if there is a database to do a connection test on.

 

Could you share the configuration data of a test database?

 

image.png

 

What are values that I need put in JdbcURL and SqlQuery (for example)?

image.png

Thank you so much for your work!

Created
Thank you so much for your feedback, actually I used test database configurations provided by our organization snowflake team, I don't have public test database connection for test. Please share it on forum if you get ,so other can also utilize that.
Created

Well explained, thanks for sharing!

Created

Thanks for sharing. It is a wonderful approach to implement snowflake integration with Mendix.

Created

Thanks for sharing!!

Created
Thanks!!
Created