Importers without associated files

79 views
Skip to first unread message

Allan Calix

unread,
Aug 29, 2022, 2:12:44 AM8/29/22
to Beancount
Hi all,

I recently switched over from using hledger to beancount and am really enjoying the thoughtful and extensive integrations (fava, importers, etc). I wrote a tool to generate ledger entries from Plaid api data a while back and am now using to generate beancount entries.

I'm removing the half-baked ledger entry printer and have an importer (WIP) to generate beancount entries instead. So far everything works as expected but parts of the importer have a clunky interface:
  1. Importers are mapped to whether they can handle specific files or not. In the case of this importer, I tend to pull date ranges each time I update my beancount file. This results in a stream of transactions for all accounts linked to Plaid. This leads to the second bit. I work around this currently by using a predefined json file with the date range as inputs.
  2. No natural account name to map to (i.e. `file_account`). Because the stream of transaction relates to multiple beancount accounts, filing doesn't make much sense in this context. This is minor as the file could be deleted after import, but is a bizarre flow when used in fava.
Overall these hiccups are minor but I'd really like to know if there are better patterns for handling extractors that are associated to multiple files and don't have a natural related file import.

Thanks for any feedback or input you can provide.

Best,
Allan

Patrick Ruckstuhl

unread,
Aug 29, 2022, 3:42:00 AM8/29/22
to bean...@googlegroups.com

Hi Allan,

I have actually lots and lots of importers which don't map to a file per se. For all of them I use actually the configuration file for the importer (e.g. with credentials in it) to trigger it. That works very well for me.

It's also not a problem to return entries with different accounts than the account you indicate on the importer (e.g. I import from some api where there are different accounts behind it).


If you want some examples, you can find them here: https://github.com/tarioch/beancounttools


Regards,

Patrick

Allan Calix

unread,
Sep 3, 2022, 9:37:50 PM9/3/22
to Beancount
Interesting, thanks for sharing. This is similar to what I ended up doing although with fava it's a little clunky since you can't extract in the UI with the account set to an empty string. It's minor but seems to work perfectly fine for bean-extract.

Thanks again!

Patrick Ruckstuhl

unread,
Sep 3, 2022, 11:08:36 PM9/3/22
to Beancount
I actually use fava to run all my importers and I don't think that's the case, it will not list the account but otherwise it shows up perfectly and you can trigger the importer from the ui.

Regards Patrick
Reply all
Reply to author
Forward
0 new messages