Can updater change historic/daily races/runners for a previous date

0 votes
When the Smartform updater runs, what does it do exactly?  Does it only update the historic_races_beta table for latest date I don't have and for the next day's race card or can it update data in the past?  It seems that I've been missing a couple of picks in my daily runner that appear later when I run an update across many dates.  I've pretty much ruled out any inconsistencies on my side (it uses the same code) so I'm now looking toward issues with the data.

Edit:  I just looked at the contents of the historic_races_beta update script and it looks like it does only update for the date I don't have.  So what I'd now like to ask is, if I run the update script more than once per day, is it possible that data changes in the script between updates?  This is the only thing I can think of, that I must have run it twice during the day and run my daily picks after the first update, and my historic pics after (2 days after to be precise).

Thanks
asked Nov 15, 2023 in Smartform by maddisor Novice (410 points)
edited Nov 15, 2023 by maddisor

1 Answer

0 votes
The updater updates all tables - depending on the parameters you have used when calling or setting the command - with the latest data since the last time that data was updated.   It uses the "loaded_at" field that you can find in all tables in order to determine the last update on your local database and then fetches and loads all data for each table that it was called for.

If for some reason you had missed a day in the past, the updater would not "know" this, since it is using the most recent 'loaded_at' timestamp in your database to determine what updates you should receive.  Running the updater more than once a day will not alter this behaviour - if you've already fetched the latest data (oe. there are no more updates subsequent to the loaded_at timestamp.

If you are sure you have some racing days missing, you can reload the entire database as an absolute backup.
answered Nov 15, 2023 by coltest Listed class (2,780 points)
Thanks for the prompt answer.
So I guess my question stands, if I do an update at 8pm and then another update at 8am the following morning or later that day, are there instances where data that is loaded into historic_runners_beta/historic_races_beta is changed by Betwise and so updated in the next update? By this I mean at 8pm data was downloaded, but subsequently changed at Betwise meaning the loaded_at date on my data is now out of date. Hope that question makes sense?
No, data is only incrementally added rather than retrospectively altered.   Most tables have data that is only updated daily, and in the case where data is different it is in a different table - e.g. we recently added a number of "advance_*" data tables - see this blog article:  https://blog.betwise.net/2023/03/12/improvements-to-advance-racecards-in-smartform/

In this case, the data is different to the usual daily* tables, but it does not change intraday.

There are a couple of tables - e.g. non_runners that do have intraday timestamps, but again data is only incrementally added.
...