root/bin/publish_analytical_db @ 9518
1 |
#!/bin/sh
|
---|---|
2 |
# Publishes analytical DB to nimoy
|
3 |
|
4 |
if ! test -n "$table" -a "$#" -eq 1; then |
5 |
echo "Usage: env table=... $0 export.csv"|fold -s >&2 |
6 |
exit 2
|
7 |
fi
|
8 |
|
9 |
"time" mysql --password --database=bien3_adb <<EOF |
10 |
LOAD DATA LOCAL INFILE '$1' |
11 |
INTO TABLE $table |
12 |
FIELDS TERMINATED BY ','
|
13 |
OPTIONALLY ENCLOSED BY '"'
|
14 |
IGNORE 1 LINES
|
15 |
;
|
16 |
EOF
|