1. Home
  2. Dx dev digest
  3. Dev tip aggregate sql element

How to convert an Aggregate to a SQL element

How to convert an Aggregate to a SQL element


Convert an Aggregate to a SQL element

As your application grows, you might find the need to change how data is fetched in an existing Aggregate. If you require more advanced data fetching options, consider using a SQL element instead of an Aggregate. Converting an existing Aggregate to a SQL element allows you to continue evolving the SQL generated from the original Aggregate.

However, it's important to note that Aggregates offer several advantages:

  • Aggregates are optimised to fetch only the necessary rows and columns at runtime.
  • Maintaining an Aggregate requires less effort.

Therefore, it is recommended to start fetching data using an Aggregate and only switch to a SQL element when necessary.

How to convert an Aggregate to a SQL element

To convert an existing Aggregate to a SQL element, watch this tutorial from OutSystems Developer Kean Amper

 

Lastest DX Insights
PhoenixDX now has even more OutSystems MVPs!
Convert local data type to data structure
Dev Tip: How to Gain Exposure to OutSystems AI Agents With Purpose

Need a digital solution tailored to your needs?

Our team is here to help. Complete the form below and we’ll be in touch shortly.