Revision 4259
Added by Aaron Marcuse-Kubitza over 12 years ago
input.Makefile | ||
---|---|---|
176 | 176 |
rm_schema: _always |
177 | 177 |
echo 'DROP SCHEMA IF EXISTS "$(datasrc)" CASCADE;'|$(psqlAsBien) |
178 | 178 |
|
179 |
# The joined tables must be suffixed with ".src" to prevent the creation of a |
|
180 |
# row_num column, which collides during joins. |
|
181 |
isJoinedTable = $(filter %.src,$*) |
|
182 |
hasRowNum = $(if $(isJoinedTable),,1) |
|
183 |
|
|
179 | 184 |
%/install: _always |
180 | 185 |
$(if $(isCsv),$(import_install_)) |
181 | 186 |
import_install_ = (prefix=; . $(bin)/vegbien_dest; "time" nice -n +5\ |
182 |
env schema=$(datasrc) table=$* $(bin)/csv2db $(catSrcs)\
|
|
183 |
$(if $(log),$(if $(quiet),&>,2>&1|tee )$*/logs/install.log.sql)) |
|
187 |
env schema=$(datasrc) table=$* has_row_num=$(hasRowNum) $(bin)/csv2db\
|
|
188 |
$(catSrcs) $(if $(log),$(if $(quiet),&>,2>&1|tee )$*/logs/install.log.sql))
|
|
184 | 189 |
|
185 | 190 |
##### Maps building |
186 | 191 |
|
Also available in: Unified diff
input.Makefile: Staging tables installation: %/install: Don't create a row_num column when the table is a joined table because it collides during joins