summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-08-27 02:03:14 -0400
committerJesse Luehrs <doy@tozt.net>2019-08-27 02:03:14 -0400
commit64db8b66b28947ced087e6248c4e3bb59595d92f (patch)
tree745d0ad4d0a289c2b559e98d7ec3414b559a02f8
parentdf9742a26b653b8df87600fff20eafa8a4067033 (diff)
downloadpuppet-tozt-64db8b66b28947ced087e6248c4e3bb59595d92f.tar.gz
puppet-tozt-64db8b66b28947ced087e6248c4e3bb59595d92f.zip
move to metabase-utils repo
-rw-r--r--modules/tozt/files/metabase18
-rw-r--r--modules/tozt/manifests/metabase.pp8
2 files changed, 5 insertions, 21 deletions
diff --git a/modules/tozt/files/metabase b/modules/tozt/files/metabase
index 08903cb..7b71430 100644
--- a/modules/tozt/files/metabase
+++ b/modules/tozt/files/metabase
@@ -12,22 +12,6 @@ trap cleanup EXIT
chown doy:doy "$tmp"
cd "$tmp"
-su doy -c /home/doy/.cargo/bin/ynab-export > /dev/null
-
-ynab-export schema | psql -U metabase ynab > /dev/null
-
-psql -U metabase ynab -c 'COPY accounts FROM STDIN' < accounts.tsv > /dev/null
-psql -U metabase ynab -c 'COPY category_groups FROM STDIN' < category_groups.tsv > /dev/null
-psql -U metabase ynab -c 'COPY categories FROM STDIN' < categories.tsv > /dev/null
-psql -U metabase ynab -c 'COPY months FROM STDIN' < months.tsv > /dev/null
-psql -U metabase ynab -c 'COPY categories_by_month FROM STDIN' < categories_by_month.tsv > /dev/null
-psql -U metabase ynab -c 'COPY payees FROM STDIN' < payees.tsv > /dev/null
-psql -U metabase ynab -c 'COPY transactions FROM STDIN' < transactions.tsv > /dev/null
-psql -U metabase ynab -c 'COPY subtransactions FROM STDIN' < subtransactions.tsv > /dev/null
-psql -U metabase ynab -c 'COPY scheduled_transactions FROM STDIN' < scheduled_transactions.tsv > /dev/null
-psql -U metabase ynab -c 'COPY scheduled_subtransactions FROM STDIN' < scheduled_subtransactions.tsv > /dev/null
-
-seq 1000000 | psql -U metabase ynab -c 'COPY ints FROM STDIN' > /dev/null
# shellcheck disable=SC2046
-su doy /home/doy/coding/investments-sheet-export/bin/load $(cat /home/doy/.config/google/investments-sheet) > /dev/null
+su doy /home/doy/coding/metabase-utils/bin/load $(cat /home/doy/.config/google/investments-sheet) > /dev/null
diff --git a/modules/tozt/manifests/metabase.pp b/modules/tozt/manifests/metabase.pp
index 8d9dc3f..06d39f9 100644
--- a/modules/tozt/manifests/metabase.pp
+++ b/modules/tozt/manifests/metabase.pp
@@ -51,7 +51,7 @@ class tozt::metabase {
source => "puppet:///modules/tozt/metabase",
require => [
Package::Cargo["ynab-export for doy"],
- Exec["clone investments-sheet-export"],
+ Exec["clone metabase-utils"],
Secret["/home/doy/.config/ynab/api-key"],
Secret["/home/doy/.config/google/investments-sheet"],
Exec["create ynab db"],
@@ -79,11 +79,11 @@ class tozt::metabase {
package => 'ynab-export';
}
- exec { "clone investments-sheet-export":
- command => "/usr/bin/git clone git://github.com/doy/investments-sheet-export",
+ exec { "clone metabase-utils":
+ command => "/usr/bin/git clone git://github.com/doy/metabase-utils",
user => "doy",
cwd => "/home/doy/coding",
- creates => "/home/doy/coding/investments-sheet-export",
+ creates => "/home/doy/coding/metabase-utils",
require => [
Class["git"],
File["/home/doy/coding"],