For a detailed post on Snowflake, check here:
Create a Snowflake Warehouse and load data!
Check how to create a snowflake warehouse and load data.
Let’s now integrate Snowflake with MuleSoft.
We will use the employee table created in the previous blog.
- Create a new mule application
- Add Database module
- Create a generic database connection
- Add maven dependency
You can copy paste the below dependency:<dependency> <groupId>net.snowflake</groupId> <artifactId>snowflake-jdbc</artifactId> <version>3.13.4</version></dependency>
- Drag a select operation and insert query:
select * from employees
- Add Transformation to prepare the final payload
%dw 2.0output application/json---payload map ((employee, index) -> { employee_id: employee.ID, employee_name: employee.NAME, employee_age: employee.AGE})```
- Now we can run the app and hit the postman
Hope you liked this integration with snowflake. Cheers. 🍻