Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The daily_update_circ_demographics task runs daily at 7am. This task runs a query called update_circsnapshot4.sql. The update query only runs if it is executed by a separate script. The update_circ_snapshot4.sql query (in the LOCAL_AUTOMATED folder in DBeaver) runs the following code on the LDP, which uses the INSERT function to get the new checkouts and add them to the local_core.circsnapshot4 table daily automatically. The local_core.circsnapshot4 table is used in circulation queries to generate reports that need the PII data that is removed everyday from circulation data in the FOLIO system.

...

The circsnapshot for Metadb uses the table that was originally created in LDP to store additional updates to demographics information needed for certain circulation queries. This table was exported from the LDP and imported into the local_core schema in Metadb. In the data import process, column data types were set to match the data types in the equivalent LDP table. 

--need to re-import table into local_shared, set permissions so that all users have Read Only permissions to use it, and set data types more accurately using metadb data types as a guide


The daily_update_circ_demographics_metadb task is set up to execute the update_circsnapshot4.sql query daily at 7am. The update query only runs if it is executed by a separate script. The update_circ_snapshot4_metadb.sql query (in the LOCAL_AUTOMATED folder in DBeaver) runs the following code on Metadb, which uses the INSERT function to get the new checkouts and add them to the sm_local_core.circsnapshot4 table daily automatically. The sm_local_core.circsnapshot4 table is used in circulation queries to generate reports that need the PII data that is removed everyday from circulation data in the FOLIO system.

The metadb version of the query was revised to NOT use derived tables. This will ensure the retrieval of all changes to records when the update query appends new data to the sm_local_core.circsnapshot4 table.


Here is the update_circ_snapshot4_metadb.sql query:


INSERT

...

FINAL VERSION OF QUERY HERE


Here is a screenshot of the local_core.sm_circs_snapshot4 table in Metadb. 




ADD INSTRUCTIONS FOR SETTING PERMISSIONS on the sm_local_core.circsnapshot4 table