Adding Current_Timestamp to HANA table
We have tables that are replicated from SAP using SLT.
We are trying to add a column to that table, so we can capture insert/update datetime every time a record is inserted or updated in the table.
We have two options currently:
1. We can add the physically add the column to the table and use the transformation from SLT server to update/insert the date with current_timestamp.
2. Adding trigger to the tables - We were told by SAP that this was not a good practice for replicated tables.
Instead of configuring in SLT server, we are trying to see if we can do this using virtual column like "Alter Table xxx Generate Always As
Apparently we cannot use Current_Timestamp in Generated As columns.
My question is does anyone know any work around where we can assign current_timestamp to virtual columns?
Or is there any way I can accomplish this other than using virtual columns?
I cannot use default in a column as it needs to update for both insert and update.
Thank you for your help.