Data Import into OutSystems
February 11, 2022
Copying Legacy data into OutSystems
Many companies  are migrating older technology solutions into this amazing Low-Code platform that is OutSystems – from Lotus Notes  to Domino to many other legacy solutions, perhaps even some made ad-hoc with “latest tech" that some developer wanted to try and that ended up an orphan in the company’s technological landscape.
if you’re replacing a legacy app with OutSystems you don’t want to keep its database around, but most probably you need its data
Companies need to innovate, and not only survive but thrive in a competitive environment, and that means being able to implement solutions for mobile, with the advantages of the cloud, with seamless integration, offering users omni-channel flows, searching for the best customer experiences (CX) evolving standards, while making sure security & compliance are assured – and OutSystems, Low-Code leader by Gartner  and for several year’s their Customer’s Choice  in the low-code environment, fills this need.
However, OutSystems has no built-in data migration tool, no way to copy data between OutSystems instances – and being low-code, there are some limitations and risks on moving data around, since you have to guarantee consistency with its metadata structure .
OutSystems has no built-in data migration tool
If you want to directly connect to the external database, or if you are importing data from an Excel file into a single entity, OutSystems can out-of-box provide it , but if you’re replacing a legacy app with a minimally connected data structure, you probably don’t want to keep its database around with an external connection – you want to bulk import that data into OutSystems entities, to be able to use the power of your new platform to the fullest!
In this scenario, when importing data from non-OutSystems solutions, you have to overcome 2 challenges:
- How to connect to (your specific) external database
- How to guarantee in the import process all the data consistency (keys, relationships between entities, circular references, etc.) needed, with the correct OutSystems database metadata definition.
Fortunately you can find in the OutSystems Forge the Data Migration Manager (DMM)  component, that offers for free the ability to import data from any non-OutSystems source!
DMM will give you the specs on how data must be setup to be imported to your OutSystems app, execute with a simple 3 step wizard the import while seamlessly guaranteeing all data consistency in OutSystems!
Data Migration Manager (DMM) component offers for free the ability to import data
DMM has the capability to fully guarantee data consistency, either while migrating data between OutSystems instances (for DevOps use-cases , for example, or when migrating OutSystems OnPrem <=> Cloud) or when importing data from non-OutSystems solutions into OutSystems.
DMM guarantees all technical and business aspects without the user (you) having to worry or do complex configurations. For example it guarantees “under-the-hood" things like: identifying the current physical tables, active fields/columns, FK relationships defined in the metadata, circular references, data types, the order of records for the import process (inserts/updates needed), management of PK fields (even when auto numbered fields) , etc..
How to import legacy data into OutSystems with DMM
You follow a 3 step approach to get your data into the OutSystems entities of your application.
First step, you use DMM Export feature to get a list of CSV files, one file for each entity in your OutSystems application. These CSV files don’t have any data, just the first line (header) with the name of the fields/columns expected by your OutSystems application for that entity.
The exported ZIP, besides the entity CSV files, has several other files that DMM will use later in the Import feature to guarantee the data consistency. You will not edit or change these other files.
Second step, you go to your legacy application database, and export (using any ETL tool that is compatible with your legacy solution) the data into CSV files with the exact structure that DMM gave you in the previous step.
You add these CSV files into the previously exported ZIP, replacing the original CSV files.
Third step, you use the DMM Import feature to load the ZIP file:
And that’s all, DMM will create the SQL scripts needed to execute the import guaranteeing the correct physical tables, active fields/columns, that connections/FKs are maintained (even circular or self references), serialized binaries and other datatypes.
In the end, you will find all your original data in the OutSystems entities, available to your new OutSystems applications!