External Databases in OutSystems Environments

Sara Pedrosa
Noesis Low-Code Solutions
4 min readJul 30, 2020

If you need to connect your OutSystems environment to an external database and deploy to different environments, this guide is for you.

To configure a database connection and use its tables or views, you will need to follow the steps:

1. DATABASE CONNECTIONS

A database connection can be configured using the Service Center. A tab “Database Connections” is available in Administration.

There are two possibilities to configure a database connection:

I. Basic Configuration

II. Advanced Configuration

2. EXTERNAL TABLES

Using OutSystems Integration Studio, an extension can be created to access the external tables/views.

Right clicking on “Entities” and selecting “Connect to External Table or View”

a wizard will help you to connect to External Tables or Views, from the databases that are connected to the environment.

After selecting a connection, a database can be selected from the available databases.

Tables and views can be added and removed to and from the extension.

The entities to represent the tables and/or views are now created and can be referenced by any module from the environment.

The warning “Missing Configuration” is related to the configuration in the Service Center. By clicking on the button “Configure” you will be redirected to the Service Center.

There, a drop-down with all the database connections, previously configured, is available for selection. The tables or views can only be used in the environment after selecting one database connection.

3. ISSUES TO BE AVOIDED WHEN DEPLOYING BETWEEN ENVIRONMENTS

Even using the wizard to connect to the external tables or views, you may face an issue when deploying between environments.

Despite having the correct database connection selected, during the extension deploy to a different environment, the same database is not guaranteed to be connected! The database connected will remain the first selected during the extension development, in the development environment. In every environments you will be able to see the reference to the database used in the development environment and not in the current one.

Changing the table name, as the example, to be “CNTR_CONTRACT”, will avoid being connected to the same database when deploying the extension to different environments.

Keeping only the tables’ name, without the database name, will guarantee the correct database connection in each environment.

4. LIMITATIONS

Only users with “Admin” role can configure the Database Connection.

For all other roles, the options will be as below and get by the user as a bug/issue:

After this reading exercise you will be able to:

  • connect an external database to an OutSystems’ environment;
  • use external tables/views in an extension;
  • avoid issues when deploying an extension using external tables/views;
  • be aware of some limitations.

Feel free to give your feedback.

--

--