Daily updates - land data
Opened this issue · 0 comments
agstephens commented
@jhaigh0 As discussed with Simon, here is our plan for running daily updates:
- Outline:
- we want a single script that will:
- find the latest cdmlite daily update files
- attempt to process each file:
- Restructure file to PSV under:
/work/scratch...
- Generate SQL command to load the new file
- Execute the SQL command
- Remove the input file(s) under:
/work/scratch...
- Restructure file to PSV under:
- Data locations and proposed workflow:
- data will be found in:
/gws/nopw/j04/c3s311a_lot2/data/level2/land/r202102/daily_updates/cdm_lite/
- In the subdirectory
incoming/
- for each file we process, we will:
- Move it to
processing/
- Attempt to process it (as outlined above)
- If any part of the process fails, move it
failed/
and log/email result - If it succeeds, move it to
complete/
and log/email result
- Move it to
- Script details:
- the script can be
bash
orpython
- it should be called something like:
./scripts/land/run-daily-update-cdmlite.(py|sh)
- it will need to use the
settings
file to get the location of the.../daily_updates/cdm_lite/
directory for a given release.
- Once it is all working:
- we will schedule it to run once per day - probably submitted to a LOTUS node, but kicked off by the
cron
server.