Tech Blog

Using the Data Updated As Of field to ensure that the analytics report API runs after ETL completes

In this blog we will describe how to use the “Data Updated As Of” field to ensure that a report will be retrieved by an API after the ETL completes.

As a prerequisite for this blog it is highly recommended to first see:

If an institution is using an API to extract Alma Analytics Data and the institution wants to make sure that the API will run only after the ETL (Extract Transform Load from Alma to Analytics) completes then:

The field “Data Updated As Of”, from the “Institution” folder, can be used.  See screenshots below.

This field appears in both Alma and in Alma Analytics and indicates the date according to which the data was extracted from Alma.

For example, if the institution runs a script every morning which extracts an analytics report, and the institution wants to run it only after the ETL has completed then

  1. Add the field “Data Updated As Of” to the report
  2. Have the script check the date of the “Data Updated As Of”
  3. In the case below the script could state “If ‘Data Updated As Of’ = Yesterday” then continue, otherwise run again later.

On a technical level this could be written as follows:

CAST(“Institution”.”Data Updated As Of” AS DATE) = CURRENT_DATE-1

In the case below if the ETL had not finished then the ‘Data Updated As Of’ would be two days ago and not “Yesterday”.

Note that in some environments the ETL starts at 01:00 AM and not 08:00 PM the night before, and in that case the script should check:

 If ‘Data Updated As Of’ = Today” then continue, otherwise run again later.

The field in AlmaThe field in the Institution FolderThe field in the results tab

Leave a Reply