There is a rule file containing the accompanying rule to appropriately appoint the Home Maintenance to appropriate accounts:
skip 1
fields , ,date,description, ,amount-in,amount-out, , ,Category
date-format %-d/%-m/%Y
if Home Maintenance
account1 Expenses:Home:Maintenance
account2 Assets:myBank:mainaccount:Home:Maintenance
However hledger import gives the following transaction block:
2026-01-12 HardwareHouse BAYSWATER AUS
Expenses:Home:Water $12.45
Assets:Bankwest:transaccount:Home:Water $-12.45
Which does not line up with the rules file. There seems to be something going on with import, where perhaps this was miscategorised before and now it's stuck with this rule and it overrides the rules csv.
Is there a way to reset the importer or something that I can do here.
You haven't shown the exact output, but perhaps you're seeing an entry previously imported using an older version of the rules ?
Test your current csv rules without importing: hledger -f foo.csv print
Check the current import state for foo.csv: cat .latest.foo.csv
Reset the import state so that all records are considered new: rm .latest.foo.csv
Update the import state so that all records are considered old: hledger import foo.csv --catchup
Set the import state back just a bit to redo an import: save the appropriate date(s) in .latest.foo.csv and run hledger import foo.csv [--dry-run] again.
After reading through the Hledger documentation. My rule file contained things like this:
skip 1
fields , ,date,description, ,amount-in,amount-out, , ,Category
date-format %-d/%-m/%Y
if Home Maintenance
account1 Expenses:Home:Maintenance
account2 Assets:myBank:mainaccount:Home:Maintenance
However I wasn't specifying which column should the rule needs to apply to. I would like the rule to be derived from the Category Column. But I assume because I wasn't specifying it properly Hledger impor was taking it from perhaps a combination of "description" as well as "Category". However, after fixing it:
skip 1
fields , ,date,description, ,amount-in,amount-out, , ,Category
date-format %-d/%-m/%Y
if %10 Home Maintenance
account1 Expenses:Home:Maintenance
account2 Assets:myBank:mainaccount:Home:Maintenance
No problems in import.
I will also take this opportunity to extend a huge thank you to Simon for the creation of Hledger, what wonderful software. Thanks.