On 09/01/25 16:28, Paul Walker wrote:
Hey all,

I'm curious what importer tricks anyone has for statements with multiple accounts. Aggregators like SimpleFIN <https://beta-bridge.simplefin.org/ > (recently discovered, a great stand-in for banks dropping ofx~ofxtools/ofxget <https://ofxtools.readthedocs.io/en/latest/> support) pull many unrelated accounts into one export file. The beangulp-required account function makes this seem antipattern ("which account?"). This also applies to some PDFs (like Fidelity which groups all retirement/non-retirement into a pair of PDFs), but I imagine many of those at least share a common base/parent account.

As you probably figured out, the account returned by importers following the beangulp interface is only used for logging and for archival of the imported files.

If you don't use the archival function, you can set the account to any string you like. If you use the archival function, just set it to an account-like string that defines the path in the documents directory where you want the statements from which you are importing stored.

For importing from statements that contain information from multiple accounts, I use two patters, depending on how I want the transactions to be grouped and how I want the statements to be archived (some of this may depend on patches to beangulp that I haven't committed to the public repository yet):

- multiple importers matching the same source file, each extracting transactions pertinent to one account. The transactions are grouped per-account in the ledger and the source statement can be copied in multiple locations in the archival folder

- single importer outputing transactions for multiple accounts. The transactions are intermixed in the ledger and the source statement is archived in only one place.

My current solution is to input a dict of all expected accounts <https://github.com/pwalkr/beancount-utils/ blob/54c118f4a4d6a706691fa3442db523b5253e3287/beancount_utils/importers/ simplefin.py#L37>, but again is awkward for the self.account <https:// github.com/pwalkr/beancount-utils/ blob/54c118f4a4d6a706691fa3442db523b5253e3287/beancount_utils/importers/ simplefin.py#L28> function (I don't actually use "archive" workflow) and > is making me update my out_of_place deduplicator <https://github.com/ pwalkr/beancount-utils/blob/54c118f4a4d6a706691fa3442db523b5253e3287/ beancount_utils/deduplicate.py#L6> which catches manually-created expenses on the wrong credit/debit card. It just doesn't isolate context and messes with the overall extract.

I don't understand what you mean and how beangulp could help solve it.

Cheers,
Dan

--
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/4e0628ad-4059-4682-901b-d725f2e70800%40grinta.net.

Reply via email to