Revision 14827
Added by Aaron Marcuse-Kubitza about 10 years ago
trunk/inputs/input.Makefile | ||
---|---|---|
323 | 323 |
$(psqlNoSearchPath) --echo-all --set=schema='"$(datasrc)"' --set=table='"$*"' \ |
324 | 324 |
$(logInstall*) |
325 | 325 |
$(exportHeader) |
326 |
$(cleanup) |
|
326 | 327 |
$(selfMake) "$*/postprocess" |
327 |
$(cleanup) |
|
328 | 328 |
|
329 | 329 |
%/install: _always |
330 | 330 |
$(import_install_) |
331 | 331 |
$(exportHeader) |
332 |
$(cleanup) |
|
332 | 333 |
$(selfMake) "$*/postprocess" |
333 |
$(cleanup) |
|
334 | 334 |
define import_install_ |
335 | 335 |
set -o pipefail; (. $(bin)/vegbien_dest; unset schemas; "time" $(nice)\ |
336 | 336 |
env schema=$(datasrc) table=$* $(bin)/csv2db $(catSrcs) $(logInstall*)) |
Also available in: Unified diff
bugfix: inputs/input.Makefile: postprocess must be run after cleanup rather than before because it depends on the cleanup having been performed.
this bug was not previously detected because this is only a problem when refreshing a datasource to data in the same format: this would attempt to run an existing postprocess.sql, out of order, instead of starting with no postprocess.sql as we usually do.
this bug was introduced in r8121, when postprocess.sql was being used to rename columns prior to mapping. use the following to view all relevant context lines in that revision's diff:
$ diff --unified=4 <(curl -o - 'https://code.nceas.ucsb.edu/code/projects/bien/inputs/input.Makefile?p=8120' 2>/dev/null) <(curl -o - 'https://code.nceas.ucsb.edu/code/projects/bien/inputs/input.Makefile?p=8121' 2>/dev/null)