[Skrooge] Account alias seems to be ignored when importing from CSV

I’ve just started using Skrooge and would like to import account operations from the bank.

The problem is that the account ID in the CSV file is quite ugly (masked) and I don’t want to use it in Skrooge but still I’d like to have the operations imported to the correct account.

The CSV import documentation (Import Files) mentions the an alias property can be used to add a new name to an account which then will be used during import.

However it doesn’t work for me: I set an alias “account_ugly_name” to an account named “account_nice_name”. Then I try to import a CSV file with account name “account_ugly_name” for each operation but a new account is being created instead of adding the operations to the account with a matching alias. Do I do this correctly?

That’s a cool feature! However, looking in Skrooge’s source (I am not a C++ programmer, nor do I play one on TV :wink: ), I only see a reference to alias in the skrooge_import_ofx plug-in code. For CSV import, you can define the regular expression to match an account column in the CSV file, but I don’t think Skrooge will try to match the account value with an account’s alias property. I would file a bug asking for alias matching to be for all importers, and add that until this is fixed, the Import Files documentation should clarify that alias matching only works with OFX (and QFX files).

I ran into a very similar problem about the same time as the OP. In my case, Discover Financial Services discontinued QFX and OFX export and the next best option seemed to be CSV. While @qqq found the account name not to match the existing name in the Skrooge database, I found that DFS doesn’t include any account name/number info at all in a CSV exported table.

I checked some more banks I used. For now, everywhere else supports a formatted export like QFX, but their CSV options all don’t include account info necessary for Skrooge to import and match transactions to an account, which is the expected behavior when one reads the docs:

One thing that might surprise you is that you won’t be asked which account the transactions should be imported into. That is because Skrooge will read the account number in the file, and will associate imported transactions to that account.

But since CSV doesn’t follow any particular format, this assumption may not always be valid. I think Skrooge devs might want to consider this case, i.e., account info not present in exported data and allow the user to specify a target account to import into.

In the meantime – after manually editing CSVs each month for almost a year :frowning: – I’ve written a Python script to prepare CSVs for import to save me the monthly hassle of editing these manually in LibreCalc first. I put in on GitHub in case anyone else wants to steal it, hack it, and put it to their own use in cases like this.

I can’t include links, so you’ll have to search GitHub for my robthebold page and see the skrooge-csv-cleaner if you want to mess around with my script.