Select data from table

 

Let’s see how we can select data from DB table using DB connector in MuleSoft.

Create project in anypoint studio and configure HTTP Listener

Drag and drop DB Select operation and configure the Oracle Database Connection

Add the Oracle JDBC Driver Jar

Select Data From Table

 

Configure the sql query text and input parameter

Pass the Input parameter as a variable

Select Data From Table

 

Query looks like below

Select Data From Table

 

Transform the selected result from database in JSON using below dataweave expression

%dw 2.0
output application/json
---
Payload

 

Deploy the project and test

Sample Data in Table

Test the Project from Postman

download sample project

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments