From b38b853440c7aaaf0b8dda0fde1896d86d3b16a5 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 18 Sep 2017 21:07:22 -0400 Subject: [PATCH 1/3] add excel file with json build macro --- build_json.xlsx | Bin 0 -> 9979 bytes log.md | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 build_json.xlsx create mode 100644 log.md diff --git a/build_json.xlsx b/build_json.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..204a1a48f5630c20d02b3403a8e6efb9d07e3831 GIT binary patch literal 9979 zcmeHNg28s37?6e;x_c<;l$1^ZX_S%<=`LxIZjerC1itb9?)P2w z-tRB?-80WVXXbhKde1p~*1Pt**V-!baF1{R2mmAi06+<-P0KQKfdK%b-~j+^01~XO zxV;_3)D8kt_i!+E)@O0IwV}v)1j~>GfQ9z|_xLX!fs%v~rA{`~o+Fti@kA!8D#zzY zrSpbum~`x96f}oK%!)aD#Pjp(X1+lx+T6CuQnvd?m)$j-X*NXhrIcB&wI-cLZ5-v} zjJEi+x9P24qn~v$lwkE}GtA<}DE8Fx=3ak+GfS|oFmZ{z4|7i7=7N2^)jqDY`GT6N zIRyUl1xq*V)gAb_Ex!uW=Cg5edrz+U`>uhmeN*vwZc4BOCbJOynMygjCSILz8KvvF zBGCjdWd;V$Zg8paQY>1JAo9WRgP-@3U?QCb{H#LI6&+D!J8y_@WBGR{JMDD59fzGF zIe8VOGNPjA{vv)VT5w%GIF`&r*$3^H$UZ1inMtdOQPo@W9l|11clIkg9u2`X6L4Mi z+&Le(^P&pq5gF1y9hqkmsc?zeU^&MPMcIDF3Kk#?9JOf@{rLTTKqdhYiAqi zDUnn=9c3ER?qu?ITCciBmsn9I8*Canw$ma`1XI!Zl#_R^5CMRP2RMMrFKop&XfcI_ zvUM3s#>Y^$f}BikoLO0Zod0F%e=#+Gdi9bxMR_=OjF6*%2g=XQg7Z(Q#%)+7w-rt9 zVAxadz`Ut3d7thsrNkiFwPdf-Ke}alq@J5q=DO!%c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JgFkqKrH$h3#(}cscQmb&eZck_m8@ zT^rAqlT3&7MF6(BS~#Pc*A4xYezR_yqM|+?A?Z6+yq!MC=UA@3E6!&Z(2Wp(57CCQ z$QWTzYGFd962{NeGIVhGmsx+(3VKP86SJRZLk&KHyCFwiB<5dKLG>>&lF>XXH-w3+ zHCHS!&aR{hEs5Qqj;oPD($wc+W0BO$v;A^iQ{gqGo zN@99M_)aYtRGFL0l9*m+WgYdJ8*#74{Soal!YmrSF(HIl)!hlu+8 z7nAqb@Jf3kXp_SB9JiDvi)rPrZ>GMrvI*Uai`-fdWD)PSq{JQnvXMi#&Cw|(9@Vnu!1=ybrR}uaQ5dTj(_II4$ zi*SD-(IWq?B=@`V?}e1Vj5DDF28~jGE35pD@OzQqFN8{sIVu zmUezT!v7^bemDJnk@lDAk2M?A^dFaOzoYyrGk?MW1VLl@KZwrX0e;mNKLdOw{Tbj- zweh?8?{mXn0Lm19yu~jw#qZX?M&Q3}0RVc+pKktVJXVp1hdLJkfC~LQK;_U^>L0)U E2f|*r8UO$Q literal 0 HcmV?d00001 diff --git a/log.md b/log.md new file mode 100644 index 0000000..8c51add --- /dev/null +++ b/log.md @@ -0,0 +1,16 @@ +## 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 From f240e95e2d92c866dcd8381c528d2f43917258c2 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 18 Sep 2017 21:47:37 -0400 Subject: [PATCH 2/3] add ubm backup --- ubm.backup | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 ubm.backup diff --git a/ubm.backup b/ubm.backup new file mode 100644 index 0000000..2c02768 --- /dev/null +++ b/ubm.backup @@ -0,0 +1,100 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 10beta4 +-- Dumped by pg_dump version 10beta4 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'WIN1252'; +SET standard_conforming_strings = on; +SET check_function_bodies = false; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: evt; Type: SCHEMA; Schema: -; Owner: ptrowbridge +-- + +CREATE SCHEMA evt; + + +ALTER SCHEMA evt OWNER TO ptrowbridge; + +-- +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: +-- + +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; + + +-- +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: +-- + +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; + + +SET search_path = evt, pg_catalog; + +SET default_tablespace = ''; + +SET default_with_oids = false; + +-- +-- Name: log; Type: TABLE; Schema: evt; Owner: ptrowbridge +-- + +CREATE TABLE log ( + id integer NOT NULL, + rec jsonb, + module text +); + + +ALTER TABLE log OWNER TO ptrowbridge; + +-- +-- Name: log_id_seq; Type: SEQUENCE; Schema: evt; Owner: ptrowbridge +-- + +ALTER TABLE log ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME log_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Data for Name: log; Type: TABLE DATA; Schema: evt; Owner: ptrowbridge +-- + +COPY log (id, rec, module) FROM stdin; +1 {"date": "2017-08-20", "item": [{"item": "Green Chili", "amount": 1.49, "account": "food"}, {"item": "Black Beans", "amount": 1.6, "account": "food"}, {"item": "Distilled Water", "amount": 7.12, "account": "food"}, {"item": "Fruit Preservative", "amount": 3.99, "account": "food"}, {"item": "Watch Battery", "amount": 3.79, "account": "stuff"}, {"item": "Sales Tax", "amount": "0.26", "account": "taxes"}, {"item": "Green Chili", "amount": -1.49, "account": "dcard"}, {"item": "Black Beans", "amount": -1.6, "account": "dcard"}, {"item": "Distilled Water", "amount": -7.12, "account": "dcard"}, {"item": "Fruit Preservative", "amount": -3.99, "account": "dcard"}, {"item": "Watch Battery", "amount": -3.79, "account": "dcard"}, {"item": "Sales Tax", "amount": -0.26, "account": "dcard"}], "vendor": "Drug Mart", "instrument": "Discover Card"} MJE +\. + + +-- +-- Name: log_id_seq; Type: SEQUENCE SET; Schema: evt; Owner: ptrowbridge +-- + +SELECT pg_catalog.setval('log_id_seq', 1, true); + + +-- +-- Name: log log_pkey; Type: CONSTRAINT; Schema: evt; Owner: ptrowbridge +-- + +ALTER TABLE ONLY log + ADD CONSTRAINT log_pkey PRIMARY KEY (id); + + +-- +-- PostgreSQL database dump complete +-- + From 76dca0d688d04044cd22002bc6d0fb95c28659b4 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 19 Sep 2017 07:17:38 -0400 Subject: [PATCH 3/3] explore options on format --- build_json.xlsx | Bin 9979 -> 10330 bytes event_log.md | 6 ++++++ new_format.pgsql | 5 +++++ 3 files changed, 11 insertions(+) create mode 100644 event_log.md create mode 100644 new_format.pgsql diff --git a/build_json.xlsx b/build_json.xlsx index 204a1a48f5630c20d02b3403a8e6efb9d07e3831..0117acb767086ccddf32d4363ebb49b1ff4590e1 100644 GIT binary patch delta 2266 zcmZ8jc{tP!7o9MJVeHFbWSg-YjARLo)YxUolJ)bA%DhH-ZP_x`kv7XuWQmbAp&DwK zNn|V1U{bb1*(2__&vgyzyRC)?6r;tno%w9C!%pfjF1+l_%4D>i-M7H? zDSZ!XdQkUZa{en?cCp!QU~RY{9bW5sse3uxcxOak zAaA0ht?1;!pkr5@a#jN30yJF)|6P5)C>l1HIkbL~gq$*5d1@YFHbKF@L{xfSScHZ@ zYR7~gaILr*MiMie$hsP9GeSV*O+mjOLi;M(D_*z^9aT5LC{w*7n#z1X(p#RG4hx(S z*6uO2hLpOfzuSoF_n1)_mMA0hq3j(Hdy^aCe zS;2HxPT-QPEjK-j)n#|E`Br`)Qs;v4$Jsm8K~?R5?*V;(j}TivZ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1rg?HqYV!i>+(v2H+kkoaaY^`?$FpG8t}o@q1*~ukj8F6Tx(Iq*wFj z(1Af=DW^K0jo~!pBg<<1W;#cM{LNzl9@B(Z>KUp>xmC#)WeNy-GKv2JQ<~j@+<-=FuH2J0tC`Ny8>=Xyu!>WUzN_2rsiv^c3NEbqJ+0Eho9a-sX5bql zOT>zhXSTd??4N1=#aF{Q{|z^ZffsXO{vw+n1w(a?_J`o)F7rQsX9krh?|Yl zFL=etp+(A2^U z*#LGmq$Q?NTcsms70KL&euekjAv(jyr(2MU@ptZ@?L#KVAD3MOEh++l0obk$;R9;+LqDMcu;lowU zT9YBad4w*DWp#e!_@=iTIWiehz9cr=(s{@ONFW3nw?s|BEFy5jvPLb03=`4TqDvWe zYl-y)*PmE|&0oJXmo!i&%2_Ad(L;ZzpdMs~Y5$fu5muWI(L=4xE3J9tqW5dKJE+q& zG@6byoP4zEp56H_9hggR6Fr(DiDRn|%<=ZFs_?H+saLn+cQLyGt@T~N`&`G|Sut{AC`vv%oxGaoE3fGVjr zB=FYxEQ;VsoS2~hiKt*6+1~NP*ca>Sf9#uKCJ}_~P&MK9hZ${G(%yXPJq-Q4r|ZC_ zu&`|o8nBluQl@(P?W!$JUi2;g(B;sO0>eMKk*(Ge_RhKEZ-Yey+IXuFjzqvXw(lF0hk-K=%6f*{{XhE8@+O z5i8poyTG!R6y46d&+-LSl@VP2I}Ju_X-T)9wvzC^w5zeup#ii%@$v<2fHb^3gj zT~1inVDrhVL{xH#v+CyD3!bVqHme trigger based on insert adds to GL + -> gl adds to balance based on GL trigger + ? how is fiscal period determined \ No newline at end of file diff --git a/new_format.pgsql b/new_format.pgsql new file mode 100644 index 0000000..0b9f4a4 --- /dev/null +++ b/new_format.pgsql @@ -0,0 +1,5 @@ +WITH j AS ( +SELECT + JSONB_PRETTY($${"vendor":"Drug Mart","date":"2017-08-20","instrument":"Discover Card","module":"MJE_O","offset":"dcard","total":18.25,"item":[{"item":"Green Chili","amount":1.49,"reason":"food"},{"item":"Black Beans","amount":1.6,"reason":"food"},{"item":"Distilled Water","amount":7.12,"reason":"food"},{"item":"Fruit Preservative","amount":3.99,"reason":"food"},{"item":"Watch Battery","amount":3.79,"reason":"supplies"},{"item":"Sales Tax","amount":"0.26","reason":"taxes"}],"gl":[{"gl":"food","amount":1.49,"reason":"food","item":"Green Chili"},{"gl":"food","amount":1.6,"reason":"food","item":"Black Beans"},{"gl":"food","amount":7.12,"reason":"food","item":"Distilled Water"},{"gl":"food","amount":3.99,"reason":"food","item":"Fruit Preservative"},{"gl":"supplies","amount":3.79,"reason":"supplies","item":"Watch Battery"},{"gl":"taxes","amount":"0.26","reason":"taxes","item":"Sales Tax"},{"gl":"dcard","amount":-1.49,"reason":"food","item":"Green Chili"},{"gl":"dcard","amount":-1.6,"reason":"food","item":"Black Beans"},{"gl":"dcard","amount":-7.12,"reason":"food","item":"Distilled Water"},{"gl":"dcard","amount":-3.99,"reason":"food","item":"Fruit Preservative"},{"gl":"dcard","amount":-3.79,"reason":"supplies","item":"Watch Battery"},{"gl":"dcard","amount":-0.26,"reason":"taxes","item":"Sales Tax"}]}$$::JSONB) as r +) +select j.r->'vendor' from j \ No newline at end of file