{{announcement.body}}
{{announcement.title}}

Connecting Snowflake With MuleSoft Database Connector

DZone 's Guide to

Connecting Snowflake With MuleSoft Database Connector

Snowflake is an analytics data warehouse provided as Software as a Service. Find out how to connect Snowflake with MuleSoft.

· Integration Zone ·
Free Resource

Introduction

Snowflake is an analytics data warehouse provided as Software as a Service. It is faster, flexible, and easy to use and it is not built on the top of any BigData platform like Hadoop. It has many similarities to the Enterprise data warehouse but also some unique and additional capabilities. As Snowflake is a SaaS application, there is no need for any hardware need to set up virtually or physically, and no additional software required to install, configure, or manage.

MuleSoft Database Connector

MuleSoft database connectors have capabilities to connect any database like MS SQL, Oracle, MySQL, etc. The database connector provides many operations like Select, Update, Delete, Insert, Calling Stored Procedure, etc.

database connector

In this article, we will see how we can connect Snowflake using a Database connector via JDBC.

Connecting the Snowflake With Database Connector

For connecting Snowflake using a Database connector, we need to perform database connection configuration. Select the Connection from the drop-down as a Generic Connection.  Provide JDBC URL, Driver class name, username, and password.

JDBC Url must be in format.

Plain Text
 




x


1
jdbc:snowflake://<account_name>.snowflakecomputing.com/?<connection_params>



We will be going to use a few connection params like user, password, DB, and schema.

Connection Param Description
user Specifies the user for the connection.
password Specifies the user for the connection.
DB Specifies the database name that wants to connect.
schema Specifies the default schema to use for the specified database

Driver class name will be net.snowflake.client.jdbc.SnowflakeDriver. JDBC Url that needs to be configured on the MuleSoft database connector will look like as shown below.

Plain Text
 




x



1
jdbc:snowflake://<account_name>.snowflakecomputing.com/?user=admin&password=test123&db=Product_Summaries&schema=public



We need to provide the username and password in the connector configuration. It will be the same username and password that we have passed in the JDBC URL.

snowflake database

Now, we will be required to install the Snowflake JDBC drive. So we can click Configure JDBC Driver and add maven dependency.

jdbc driver

Now, we can add the below-mentioned maven dependency and click on the finish. This will add maven dependency in the Pom.xml and download required libraries.

net.snowflake

XML
 




xxxxxxxxxx
1


1
<dependency>
2
    <groupId>net.snowflake</groupId>
3
    <artifactId>snowflake-jdbc</artifactId>
4
    <version>3.12.9</version>
5
</dependency>



Once all the configuration has been finished, we can simply test the connection.

test connection success

Now, you know how to connect Snowflake with MuleSoft via JDBC connection.

Topics:
integration, mulesoft, mulesoft 4, snowflake, tutorial

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}