Revision 9074
Added by Aaron Marcuse-Kubitza over 11 years ago
table.run | ||
---|---|---|
5 | 5 |
. "$(dirname "${BASH_SOURCE[0]}")"/path/to/table.run |
6 | 6 |
|
7 | 7 |
func_override import__table_run |
8 |
import ()
|
|
8 |
import() |
|
9 | 9 |
{ |
10 | 10 |
echo_func |
11 | 11 |
before_import_cmds |
... | ... | |
25 | 25 |
mk_esc_name table |
26 | 26 |
export schema table |
27 | 27 |
|
28 |
input_make ()
|
|
28 |
input_make() |
|
29 | 29 |
{ |
30 | 30 |
echo_func |
31 | 31 |
extern make --directory="$top_dir"/.. "${@/#/$table/}" |
32 | 32 |
} |
33 | 33 |
|
34 |
map_table ()
|
|
34 |
map_table() |
|
35 | 35 |
{ |
36 | 36 |
echo_func |
37 | 37 |
input_make map.csv |
... | ... | |
42 | 42 |
EOF |
43 | 43 |
} |
44 | 44 |
|
45 |
mk_derived ()
|
|
45 |
mk_derived() |
|
46 | 46 |
{ |
47 | 47 |
echo_func |
48 | 48 |
"$root_dir"/schemas/VegCore/mk_derived |
49 | 49 |
} |
50 | 50 |
|
51 |
remake_VegBIEN_mappings ()
|
|
51 |
remake_VegBIEN_mappings() |
|
52 | 52 |
{ |
53 | 53 |
echo_func |
54 | 54 |
public_schema_exists || return 0 |
... | ... | |
56 | 56 |
yes|input_make test |
57 | 57 |
} |
58 | 58 |
|
59 |
postprocess () # overridable
|
|
59 |
postprocess() # overridable |
|
60 | 60 |
{ |
61 | 61 |
echo_func |
62 | 62 |
local file="$top_dir"/postprocess.sql |
63 | 63 |
if test -e "$file"; then psql "$@"; fi |
64 | 64 |
} |
65 | 65 |
|
66 |
import ()
|
|
66 |
import() |
|
67 | 67 |
{ |
68 | 68 |
echo_func |
69 | 69 |
map_table |
Also available in: Unified diff
*{.sh,run}: removed extra space between function name and (), which is apparently not needed even though `help function` includes it. this greatly improves readability, including when function names are pasted into commit messages!