Makes yodlee edit work again
This commit is contained in:
@@ -79,38 +79,37 @@
|
||||
:quote? (constantly true))))
|
||||
|
||||
(defn write-inference []
|
||||
(with-open [f (io/writer "~/dev/transaction-training/input/inference.csv")]
|
||||
(csv/write-csv f
|
||||
(into [["transaction" "client" "bank" "bank_type" "description" "date" "amount"]]
|
||||
(->>
|
||||
(dc/q '[:find ?t ?c ?bn ?bt2 ?do ?d ?amt
|
||||
:in $ ?start
|
||||
:where
|
||||
[?t :transaction/date ?d]
|
||||
[(>= ?d ?start)]
|
||||
[?t :transaction/approval-status :transaction-approval-status/unapproved]
|
||||
(not [?t :transaction/matched-rule])
|
||||
(not [?t :transaction/payment])
|
||||
[?t :transaction/client ?c]
|
||||
[?c :client/code ?code]
|
||||
(not [?t :transaction/vendor])
|
||||
(not [?t :transaction/accounts])
|
||||
[?t :transaction/description-original ?do]
|
||||
[?t :transaction/amount ?amt]
|
||||
[?t :transaction/bank-account ?b]
|
||||
(csv/write-csv *out*
|
||||
(into [["transaction" "client" "bank" "bank_type" "description" "date" "amount"]]
|
||||
(->>
|
||||
(dc/q '[:find ?t ?c ?bn ?bt2 ?do ?d ?amt
|
||||
:in $ ?start
|
||||
:where
|
||||
[?t :transaction/date ?d]
|
||||
[(>= ?d ?start)]
|
||||
[?t :transaction/approval-status :transaction-approval-status/unapproved]
|
||||
(not [?t :transaction/matched-rule])
|
||||
(not [?t :transaction/payment])
|
||||
[?t :transaction/client ?c]
|
||||
[?c :client/code ?code]
|
||||
(not [?t :transaction/vendor])
|
||||
(not [?t :transaction/accounts])
|
||||
[?t :transaction/description-original ?do]
|
||||
[?t :transaction/amount ?amt]
|
||||
[?t :transaction/bank-account ?b]
|
||||
|
||||
[?b :bank-account/name ?bn]
|
||||
[?b :bank-account/type ?bat]
|
||||
[?bat :db/ident ?bt]
|
||||
[(name ?bt) ?bt2]
|
||||
|
||||
]
|
||||
(dc/db auto-ap.datomic/conn)
|
||||
#inst "2023-01-01")
|
||||
(map (fn [[t code bn bat d date amt]]
|
||||
[t code bn bat d (auto-ap.time/unparse-local (clj-time.coerce/to-date-time date) auto-ap.time/iso-date) amt]))
|
||||
))
|
||||
:quote? (constantly true))))
|
||||
[?b :bank-account/name ?bn]
|
||||
[?b :bank-account/type ?bat]
|
||||
[?bat :db/ident ?bt]
|
||||
[(name ?bt) ?bt2]
|
||||
|
||||
]
|
||||
(dc/db auto-ap.datomic/conn)
|
||||
#inst "2023-01-01")
|
||||
(map (fn [[t code bn bat d date amt]]
|
||||
[t code bn bat d (auto-ap.time/unparse-local (clj-time.coerce/to-date-time date) auto-ap.time/iso-date) amt]))
|
||||
))
|
||||
:quote? (constantly true)))
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user