summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-08-25 04:32:45 -0400
committerJesse Luehrs <doy@tozt.net>2019-08-25 04:32:45 -0400
commit574ac134c28cde99ab108c09f449805e5681a331 (patch)
tree314832d17881da50dab2e4fdae6542be5ce2b5e6 /bin
parentedc6d05e8293a61ebba00f118c6a28e1218752b1 (diff)
downloadmetabase-utils-574ac134c28cde99ab108c09f449805e5681a331.tar.gz
metabase-utils-574ac134c28cde99ab108c09f449805e5681a331.zip
add load script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/load14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/load b/bin/load
new file mode 100755
index 0000000..ab01ca9
--- /dev/null
+++ b/bin/load
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -eu
+
+cd "$(dirname "$0")/.." || exit 1
+
+cargo build
+cd data || exit 1
+
+rm -f ./*.tsv || true
+../target/debug/investments-sheet-export
+
+psql -U metabase investments < schema.sql
+psql -U metabase investments -c 'COPY categories FROM STDIN' < categories.tsv
+psql -U metabase investments -c 'COPY holdings FROM STDIN' < holdings.tsv