Contact Free trial Login

Database Connector - Mule 4

The Database connector establishes communication between your Mule app and a relational database.

To install this connector:

  1. In Anypoint Studio, click the Exchange icon in the Studio task bar.

  2. Click Login in Anypoint Exchange and supply your Anypoint Platform username and password.

  3. Search for the Database connector for Mule 4 and click Install.

  4. Follow the prompts to install the connector.

After adding the connector to Studio, the connector and its operations appear in the Mule Palette.

Database Listeners and Operations

The Database connector provides a listener to read from a database in the Source section of a flow. Other operations also allow you to read and write to a database anywhere in the Process section. Instead of writing single records to a database, bulk operations allow you to modify a collection of records by simply supplying the SQL to modify each record. Other operations allow you to carry out Data Definition Language (DDL) operations, to execute stored procedures, or to execute entire SQL scripts at once.

Database Connector Features

  • Improved operations: Operations are streamlined to make it easier to interface with a database, either with single or bulk operations.

  • Dynamic queries are easy: There is a single experience for executing static and dynamic queries.

  • Embeddable transformations: You can embed DataWeave transformations inside the Insert and Update operations to construct the data sets that you want to send to the database without a side effect on the message or the need to use enrichers.

  • Streaming support: The connector uses Mule’s streaming framework to handle streaming automatically and transparently. You can even execute a Select statement and process the results asynchronously without worrying about leaking connections.

Supported Database Types

The Database Connector provides specialized support for the following database:

  • MySQL

  • Oracle

  • Microsoft SQL Server

You can set up other JDBC databases using a generic JDBC configuration. You can also reference a JDBC DataSource object or a XADataSource object, which is required for XA transactions. You typically create the object in Studio using Spring.

Was this article helpful?

πŸ’™ Thanks for your feedback!

Edit on GitHub