66
Views
9
Comments
Solved
Transform Views , Store Procedures to tables

Hello,

I am trying to transform a legacy app to outsystems App.
The legacy app logic is mostly sql server store procedures and views.
There is a reporting server that previews the operations from views and store procedures. What is the best way to transform the results of store procedures / views to outsystems table? Must I create separate tables for each store procedure and each view and update the result of those table at runtime? Is there any way to do it with the fetch the data from other sources and preview it as table?

2024-12-04 09-29-36
Ricardo Real
Solution

Hi,

Thanks for the additional context. In that case, check out this post, which I believe is a similar case to yours.

Hope this clarifies the process to you.

Kind regards,

Ricardo

UserImage.jpg
Savvas Savva

Thanks! This post points me to the right direction, and that's what I actually need to do.

2024-12-04 09-29-36
Ricardo Real

Hello,

Transforming legacy apps to OutSystems is a very common exercise, specially when the legacy app is mostly stored procedures and views, as you've indicated.

The best strategy to ensure this depends on several factors such as the number of procedures and views, their complexity, core business criticality, data volumetry, etc.

To try to answer to your question in the most objective way, I would suggest:

  1.  Evaluate if it is possible to migrate the stored procedure / views from SQL Server to the Platform visual modeling language. I recommend to code all business logic to leverage the platform's built-in monitoring and deployment capabilities, and for maintainability reasons.

  2. If for some reason, the previous step is not possible, than you can create separate tables for each SP and View. However, as I've mentioned previously, it is not a "one size fits all" solution.

To help you with your strategy I recommend you the Integrate with an external database article, and the Integrating with External Databases course.

Let me know if this helped you.

Kind regards,

Ricardo

UserImage.jpg
Savvas Savva

Thanks for your answer. It clears things up. So, there is no way to get a query result shaped as an outsystems table in reactive web, am I wrong? 

2024-12-04 09-29-36
Ricardo Real

Hi,

When you use Integration Studio to map views, you actually are mapping them directly to Entities (OutSystems tables) in an Extension Module.

Then you can directly consume those entities in all modules, to use them in your web or mobile applications.

Kind regards,

Ricardo

UserImage.jpg
Savvas Savva

Ok, this can be done by keeping the old database. But, I plan to switch my database, and so I have to transform the store procedures and views to the new database, (that outsystems points to). This operation is complex in my case, and I don't want to redesign the whole system from scratch.

2024-12-04 09-29-36
Ricardo Real
Solution

Hi,

Thanks for the additional context. In that case, check out this post, which I believe is a similar case to yours.

Hope this clarifies the process to you.

Kind regards,

Ricardo

UserImage.jpg
Savvas Savva

Thanks! This post points me to the right direction, and that's what I actually need to do.

2024-12-04 09-29-36
Ricardo Real

Glad I could help :)

If you agree, can you mark this post as Solved, so that other community members know there is a solution when searching for similar topics?

Many thanks,

Ricardo

UserImage.jpg
Savvas Savva

Marked!

2024-12-04 09-29-36
Ricardo Real
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.