how to refresh external db table list after record updated in leap db?

Hi , 

I am taking the data from external db (Ex redshift db) and updating few of records in to leap db. 

After updated changed in leap db, i need to refresh the external db table in redshift and not to show those updated records in the list. 

Note: I do not have permissions to write for external db table. Just i can able to read the records from redhsift db. 


Thanks in advance.

Gangadhara.

What is there to refresh if you are not updating the external table?

Hello Gangadhara, 

If you don't have write permissions on redshift db, you can't update it. 

The easiest and performatic way, I think, is:

You need a local database entity that holds the redshift entries you already update, and you filter your redshift records based on this list. 

You can even perform an SQL already removing those ids, maybe. 

In a way or another, you have to store the IDs already worked on. 

If you retrieve the records in an ordered way, you can store only the last Id, or date or whatever you use to order and filter the query using this information. 

Hope this helps. 

Cheers 

Thanks Jauch & Kuhlmann,


Main purpose is while displaying the list from redshift db , whatever we have done saved in leap db, that records not to show in display, to do that asked refresh the list. Also data only taking from redshift and no updates in redshift main data, I need to show only not done changes records in our leap. 


Ex: Redshift db RTAB tables has 1000 records, 

First time i have done few changes 100 out of 1000. So i need to disply only 900 in the list whenver done saved these 100 recrods into our outsysmtes db. 

next time another 50 done changes and saved in outsystem db. 850 need to disply from redshfit list page. 


Tried with aggregate but different db's, not able to do that way. 


Regards,

Gangadhara. 



Solution

Hi,

That's why I suggested keeping the information about what records you already processed locally. :)

If you are saving locally (OutSystems DB), the best would be to force the process to happen in an ordered way, so it is easier to filter the first one.

But yes, you can't "join" entities from different DB. For example, you can have an SQL like that:

SELECT {ExternalEntity}.*
FROM {ExternalEntity}
WHERE {ExternalEntity}.[Id] > @LastIdProcessed.

If you can't do this type of filtering it will be much harder to do what you need, I think... You would have to fetch data segmented, for example, filter in the Logic (bad, as the data is coming anyway).

Cheers

Solution