Compound reg parent audit log #961
Replies: 4 comments 3 replies
-
Interesting! I think the industry term for this topic is Change Data Capture (CDC) That first link above outlines several methods:
I don't like Table Deltas for this use case, but I think any of the other 3 could be considered. Trigger-based CDC would mean adding database triggers in Postgres to write to the "shadow tables" or "audit tables" as you've called them. This could involve a performance hit, but it'd be in the database layer so it'd likely be less of a hit than doing the same thing in Java. We do also already have SQL knowledge and a robust way of adding SQL migrations through flyway. Log-based CDC would read the changes from the database logs and stream them elsewhere (or even back into an archive / audit table). One stack to do this would be Debezium + Kafka Pros:
|
Beta Was this translation helpful? Give feedback.
-
We are going to write a trigger-based solution and contribute to the OSS project when we get it working |
Beta Was this translation helpful? Give feedback.
-
@philippcheung - @jmcneil86043 mentioned you implemented the triggers and have them and can share them with us. Can you upload here or create a PR? Thanks! |
Beta Was this translation helpful? Give feedback.
-
For future reference @jmcneil86043 -- it can be found on bug NIM-616 in our internal tracking system. Here's the trigger we deployed.
|
Beta Was this translation helpful? Give feedback.
-
A long-time ACAS user needs an audit-log for any changes to the small-molecule parent. This is for IP reasons. I believe the because structure changes are an actual IP record they properly belong in the schema, and not just captured by service monitoring. The parent table has an ignored column that could be used to save old records, but it has not been used in practice. I am concerned that adding ignored records could have unintended consequences in both ACAS code (which could be fixed) and also in other tools like Data Integrator and database views that clients may have created. An uglier, but less risky approach would be to make a parent archive table.
The CReg schema was intentionally designed to be easy to query for chemists and therefore has a more conventional form than the rest of ACAS. For this reason, I am not very concerned about ignoring ACAS standards (pun intended).
I propose these steps:
Is there are better approach? The client would sponsor this enhancement to OSS ACAS/Creg
Beta Was this translation helpful? Give feedback.
All reactions