coopercenter / postgres-etl

Code for retrieving, organizing, and managing data in our postgres database
GNU General Public License v3.0
1 stars 0 forks source link

Add to metadata: time stamp of most recent data db refresh #22

Closed athena-small closed 4 years ago

athena-small commented 4 years ago

Each time new data are written to a data table, the associated row in the metadata table should include a time stamp indicating when this most recent edit was made.

To do so, update the value of the last_db_refresh field in the metadata table to equal the current time in the UTC time zone.

The R function lubridate::with_tz(Sys.time(), "UTC") gives the current time in UTC time zone.

References:

21

https://github.com/orgs/coopercenter/teams/data-management/discussions/7