27
Views
3
Comments
Migrate data from TEST to PROD in ODC
Application Type
Reactive

Hi everyone!

What is the recommended way to migrate database records from TEST environment into PROD environment in ODC? I need to transfer all data from one table.

2024-09-16 04-37-55
Karan Shinde

Hi,

Option 1: Use a Data Action with a Temporary Screen or Logic

Best for: Simple table-level migrations (like reference or configuration data).

Steps:

  1. Create a Server Action or Screen in TEST that uses an Aggregate to fetch all records from your target entity.

  2. Export that data into a structure like JSON or CSV (you can log it or expose via REST temporarily).

  3. In PROD, create a corresponding Import Action to insert the received data into the same entity.

  4. Test with small batches first, then execute once all looks good.

  5. Delete/disable this logic after migration for security.

**Option 2: Use the Built-in Data Migration via Excel Import

Best for: Small or moderate-sized datasets, or when business users can perform it.

Steps:

  1. In the TEST environment, open the entity in Data tab → Export to Excel.

  2. Review and clean the exported data (ensure no foreign key mismatches).

  3. In the PROD environment, open the same entity → Import from Excel.

  4. OutSystems will insert or update the records as needed.

This is manual but safe and supported. Ensure the schema (entities & attributes) is identical between TEST and PROD.

Option 3: Expose a Temporary REST API

Best for: Large data sets or automated migrations.

Steps:

  1. In TEST, expose a REST API that returns all records from your table.

  2. In PROD, create a consumer module that calls that API and inserts the data.

  3. Execute once and validate the records.

  4. Disable or delete the REST API afterward.

Secure it using Basic Authentication or an API key. This method is often used in enterprise data synchronization.

Option 4: Use a Dedicated Migration App or Script

If you have many entities or need repeatable migrations, build a small “Data Migration App” that:

  • Reads from TEST (through REST or exported data)

  • Writes into PROD

  • Logs migration progress and errors

This is more advanced but scalable.

2019-01-07 16-04-16
Siya
 
MVP

@Lavanya Kamalaguru , @Gourav Shrivastava  :  Reference provided are specific to OS11.  @Łukasz Kaproń  is looking for ODC data migration. 

@Łukasz Kaproń : You may implement a Import / Export feature as suggested by @Karan Shinde.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.