I will now insert a new row in the USERS table as follows: insert into "public"."users" values (1, 'Marc Goossens', 'bocebad@gmail.com');
This is what we will get in the USERS_CHANGES table :
We will now make a change to the row we just added to the USERS table : update "public"."users" set "email" = 'marcges@protonmail.ch' where "user_id" = 1;
When we look again at the USERS_CHANGES table, we now get:
As a final test, we will now delete the row we created in the USERS table : delete from "public"."users" where "user_id" = 1;
.... and now our USERS_CHANGES table looks like this:
I hope you will get the point that this will be very useful to incrementally load our Data Warehouse.
In the next page we will see the PostgreSQL code to implement a CDC table on the AVIATIONSTACK_FLIGHTDATA_STAGING table and then incrementally load our Data Warehouse from this table. (maybe you can try this by yourself as an exercise)