Revision 4260
Added by Aaron Marcuse-Kubitza about 12 years ago
input.Makefile | ||
---|---|---|
176 | 176 |
rm_schema: _always |
177 | 177 |
echo 'DROP SCHEMA IF EXISTS "$(datasrc)" CASCADE;'|$(psqlAsBien) |
178 | 178 |
|
179 |
# For staging tables which are derived by joining together other staging tables. |
|
180 |
%/install: %/create.sql _always |
|
181 |
(echo 'SET search_path TO "$(datasrc)";'; echo 'CREATE TABLE "$*" AS';\ |
|
182 |
cat $<; echo ';'; echo 'VACUUM ANALYZE "$*";')|$(psqlAsBien) --echo-all |
|
183 |
(prefix=; . $(bin)/vegbien_dest; env schema=$(datasrc) table=$* \ |
|
184 |
errors_table_only=1 $(bin)/csv2db) |
|
185 |
|
|
179 | 186 |
# The joined tables must be suffixed with ".src" to prevent the creation of a |
180 | 187 |
# row_num column, which collides during joins. |
181 | 188 |
isJoinedTable = $(filter %.src,$*) |
Also available in: Unified diff
input.Makefile: Staging tables installation: %/install: Support alternative generation of a staging table by joining together other staging tables in a create.sql file