From 4b7a7ee4b769d98e575eb6ee4675af96e85545d9 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 5 Feb 2018 23:18:27 -0500 Subject: [PATCH] put stuff in folders, delete a couple more --- rebuild_pg.cmd => deploy/rebuild_pg.cmd | 0 ubm_backup.cmd => deploy/ubm_backup.cmd | 0 ubm_schema.sql => deploy/ubm_schema.sql | 0 do_map.pgsql => functions/do_map.pgsql | 0 .../do_map_g_option.pgsql | 0 srce.pgsql => functions/srce.pgsql | 0 log.md | 16 ------------- .../col_balance.pgsql | 0 dcard_bal.pgsql => reports/dcard_bal.pgsql | 0 list_maps.pgsql => reports/list_maps.pgsql | 0 loan_bal.pgsql => reports/loan_bal.pgsql | 0 .../map_rv_items_not_mapped.pgsql | 0 srce_unq.pgsql => reports/srce_unq.pgsql | 0 .../transaction_range.pgsql | 0 srce_defn.pgsql | 24 ------------------- map_rm.pgsql => templates/map_rm.pgsql | 0 .../map_rm_template.pgsql | 0 .../srce_template.pgsql | 0 18 files changed, 40 deletions(-) rename rebuild_pg.cmd => deploy/rebuild_pg.cmd (100%) rename ubm_backup.cmd => deploy/ubm_backup.cmd (100%) rename ubm_schema.sql => deploy/ubm_schema.sql (100%) rename do_map.pgsql => functions/do_map.pgsql (100%) rename do_map_g_option.pgsql => functions/do_map_g_option.pgsql (100%) rename srce.pgsql => functions/srce.pgsql (100%) delete mode 100644 log.md rename col_balance.pgsql => reports/col_balance.pgsql (100%) rename dcard_bal.pgsql => reports/dcard_bal.pgsql (100%) rename list_maps.pgsql => reports/list_maps.pgsql (100%) rename loan_bal.pgsql => reports/loan_bal.pgsql (100%) rename map_rv_items_not_mapped.pgsql => reports/map_rv_items_not_mapped.pgsql (100%) rename srce_unq.pgsql => reports/srce_unq.pgsql (100%) rename transaction_range.pgsql => reports/transaction_range.pgsql (100%) delete mode 100644 srce_defn.pgsql rename map_rm.pgsql => templates/map_rm.pgsql (100%) rename map_rm_template.pgsql => templates/map_rm_template.pgsql (100%) rename srce_template.pgsql => templates/srce_template.pgsql (100%) diff --git a/rebuild_pg.cmd b/deploy/rebuild_pg.cmd similarity index 100% rename from rebuild_pg.cmd rename to deploy/rebuild_pg.cmd diff --git a/ubm_backup.cmd b/deploy/ubm_backup.cmd similarity index 100% rename from ubm_backup.cmd rename to deploy/ubm_backup.cmd diff --git a/ubm_schema.sql b/deploy/ubm_schema.sql similarity index 100% rename from ubm_schema.sql rename to deploy/ubm_schema.sql diff --git a/do_map.pgsql b/functions/do_map.pgsql similarity index 100% rename from do_map.pgsql rename to functions/do_map.pgsql diff --git a/do_map_g_option.pgsql b/functions/do_map_g_option.pgsql similarity index 100% rename from do_map_g_option.pgsql rename to functions/do_map_g_option.pgsql diff --git a/srce.pgsql b/functions/srce.pgsql similarity index 100% rename from srce.pgsql rename to functions/srce.pgsql diff --git a/log.md b/log.md deleted file mode 100644 index 8c51add..0000000 --- a/log.md +++ /dev/null @@ -1,16 +0,0 @@ -## Log of event - -use spreadsheet to build json transactions and dump to a log that links to bank data - -bank -binoculars -**manicure/pedicure** -**necklace** -bassinet & baby stuff -kids phone -dress -hanging chair -**sunglasses** -**footy pajamas** -printing calculator -cash register diff --git a/col_balance.pgsql b/reports/col_balance.pgsql similarity index 100% rename from col_balance.pgsql rename to reports/col_balance.pgsql diff --git a/dcard_bal.pgsql b/reports/dcard_bal.pgsql similarity index 100% rename from dcard_bal.pgsql rename to reports/dcard_bal.pgsql diff --git a/list_maps.pgsql b/reports/list_maps.pgsql similarity index 100% rename from list_maps.pgsql rename to reports/list_maps.pgsql diff --git a/loan_bal.pgsql b/reports/loan_bal.pgsql similarity index 100% rename from loan_bal.pgsql rename to reports/loan_bal.pgsql diff --git a/map_rv_items_not_mapped.pgsql b/reports/map_rv_items_not_mapped.pgsql similarity index 100% rename from map_rv_items_not_mapped.pgsql rename to reports/map_rv_items_not_mapped.pgsql diff --git a/srce_unq.pgsql b/reports/srce_unq.pgsql similarity index 100% rename from srce_unq.pgsql rename to reports/srce_unq.pgsql diff --git a/transaction_range.pgsql b/reports/transaction_range.pgsql similarity index 100% rename from transaction_range.pgsql rename to reports/transaction_range.pgsql diff --git a/srce_defn.pgsql b/srce_defn.pgsql deleted file mode 100644 index 65361c3..0000000 --- a/srce_defn.pgsql +++ /dev/null @@ -1,24 +0,0 @@ -\timing -/* -WITH -ext AS ( -SELECT - srce - ,defn->'unique_constraint'->>'fields' - ,ARRAY(SELECT ae.e::text[] FROM jsonb_array_elements_text(defn->'unique_constraint'->'fields') ae(e)) text_array -FROM - tps.srce - --add where clause for targeted source -) -*/ - -SELECT COUNT(*) FROM -( -SELECT DISTINCT - t.srce - ,(SELECT JSONB_OBJECT_agg(ae.e,rec #> ae.e::text[]) FROM jsonb_array_elements_text(defn->'unique_constraint'->'fields') ae(e)) ja -FROM - tps.trans t - INNER JOIN tps.srce s ON - s.srce = t.srce -) X \ No newline at end of file diff --git a/map_rm.pgsql b/templates/map_rm.pgsql similarity index 100% rename from map_rm.pgsql rename to templates/map_rm.pgsql diff --git a/map_rm_template.pgsql b/templates/map_rm_template.pgsql similarity index 100% rename from map_rm_template.pgsql rename to templates/map_rm_template.pgsql diff --git a/srce_template.pgsql b/templates/srce_template.pgsql similarity index 100% rename from srce_template.pgsql rename to templates/srce_template.pgsql