Tech Bites - How to integrate with an External DB

< Back to Blog

How to integrate with an external database?

OutSystems allows creating data models from scratch.


But in some cases, we need to connect to other pre-existing databases not hosted in the same environment.

To do this, we will create an extension using Integration Studio, define the integration and later consume that extension in Service Studio.


First, we need to define a database connection in Service Center.

If you don’t have one defined yet, make sure to create one using a user with the required access permissions for the specified database.

Let’s start: open the Integration Studio, create a new extension, and name it.

Right-click the Entities folder and choose Connect to external table or view.

This wizard is super easy to follow. Don’t believe me? Keep watching.


Click the Next button, choose one existing database connection, click next and choose one of the available databases inside this connection.

Now it’s necessary to decide which tables or views we want to access in our OutSystems application. Select the ones needed and click Add.

Click Next and provide a logical database name and click Next once again. 

At this point, the platform is generating the entities that will represent the integrated tables or views. Finally, we finish and publish. 

However, there is still one last configuration: Click the Configure button, the Service Center opens, and we just have to associate the newly created integration with the existing database connection.

We are ready to head over to the Service Studio and use the newly integrated tables in one of our application screens.

Open the manage dependencies window, search for the new extension, and select the external entities. Click apply. 

In the data layer, it is possible to see the dependency on the new extension, referring to the external entities. Have fun scaffolding screens for those entities, create new records, edit, query, you name it! 


We are all set.



Turn Up Academy

Apply to our Turn Up Boot Camp

AND BECOME THE NEXT OUTSYSTEMS CERTIFIED DEVELOPER
(
Senior Instructor
)

Latest Articles

How to download Excel files in OutSystems

How to download Excel files in OutSystems

Learn how to download Excel files using the OutSystems platform in this simple tutorial!

DevZone
Mastering Email Integration with OutSystems: A Step-by-Step Guide

Mastering Email Integration with OutSystems

In OutSystems Reactive Web Applications, we can configure the Service Center and implement logic in the Service Studio to send emails to our peers or contacts. Follow this step-by-step guide to learn how to!

DevZone
How to use WebAssembly inside OutSystems - Part 2

How to use WebAssembly inside OutSystems - Part 2

WebAssembly (WASM) is a new technology that is getting a lot of attention. We continue the use of Go compiled to WASM to show how we can use WASM inside OutSystems.

DevZone