Insert new record even when Source has 0 records
I am loading delta loads to a Write optimized DSO (Delta- both Infopackage and DTP). I need to insert a new record into the DSO based on the logic I have in Start routine and Field routine for some fields.
The record has to be inserted even if the loads pick 0 records from the source. I need to make use of derivations used in object routine for some fields for inserting this new record. Please help out a way to achieve this.
I am not sure if BI system permits you to do so. Consider below points before going ahead.
As the key in write optimized dso is Request GUID, Data Package, Data Record Number; what values are you going to populate in those fields.
I have never seen any one writing code to insert or delete records in active table of a DSO (except when direct update DSO is used).
If you write code to populate a record, you will not be able to track it based on requests or logs. you will not see coresponding request that loaded this data on the manage screen of DSO and can't be tracked based on requests.
In DTP filters most of the times developers are not given authorizations to modify(add or delete records) in DSO(or cubes or any standard tables) , generally it will be read authorization check the authorizations, see if you have permisions to modify active table in production environment.
I would suggest one more option -
Create a dummy record (with some unique value in a field, lets say a record for 1st Jan 1901) in the PSA from where you are loading data to the DSO.
create delta DTP with filter ( date > 1/1/1901) this is for normal hourly loads.
Every hour with the above delta load, trigger a full load (with filter date = 1/1/1901) that brings this record to the DSO.
Keep in mind that you should not delete this record from PSA when you are cleaning PSA periodically.
Even if you clean it, you have to mailtain it again manually.
Hope it helps.