Hi Everyone,
i am working on API expose and consume to get the data from a s3 bucket. my question is what is the differerence between getting the data from a data action and getting the data from a aggregate
Hi Saif,
Data Action - If we need to fetch data from Server Action, Rest/Soap API, SQL Query then we can use Data Action.
Fetch Data from Database - Aggregates are used to fetch data from database entity.
Please see the below links -
https://success.outsystems.com/Documentation/11/Developing_an_Application/Implement_Application_Logic/Actions_in_Reactive_Web_and_Mobile_Apps?_gl=1*pasly2*_ga*MzE5MTA5ODAzLjE2NTA5NDA5ODM.*_ga_ZD4DTMHWR2*MTY1MjY3NDIzMy40LjEuMTY1MjcwMzkyNC4xNw..#data-actions
https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Query_Data/Fetch_and_display_data_from_the_database_in_OutSystems
https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Query_Data/Fetch_and_display_data_from_an_integration
Thanks
Vinod
There is also a good article in case you want to use to do pagination, sorting and filtering using data actions that I think is quite useful.
https://itnext.io/paginating-sorting-and-filtering-data-from-a-data-action-f5cb997fdc60
Reagrds,
Márcio
Adding one point
Never create an action to execute an Aggregate. When the query is isolated in an action by itself, the Platform can't optimize the number of fields to be retrieved.
For more detail Kindly visit below link.
https://success.outsystems.com/Documentation/Best_Practices/Performance_and_Monitoring/Performance_Best_Practices_-_Queries
Best Regards
Devendra