aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/load7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/load b/bin/load
index 6b5de19..b441d90 100755
--- a/bin/load
+++ b/bin/load
@@ -1,5 +1,12 @@
#!/bin/sh
+cargo build
+cd data || exit 1
+
+rm -f ./*.tsv
+../target/debug/ynab-export
+
+psql -U metabase metabase < schema.sql
psql -U metabase metabase -c 'COPY accounts FROM STDIN' < accounts.tsv
psql -U metabase metabase -c 'COPY category_groups FROM STDIN' < category_groups.tsv
psql -U metabase metabase -c 'COPY categories FROM STDIN' < categories.tsv