[GNC] Example of multi-split feature of CSV importer?

David Cousens davidcousens at bigpond.com
Sat Mar 23 21:47:37 EDT 2019


Patrick,

When the Transaction is opened with the split button, the Description field name should change to Memo. There are other
changes in the headings as described in the documentation (
https://www.gnucash.org/docs/v3/C/gnucash-help/trans-multi-enter.html). If my understanding is correct, each split of a
transaction has its own Memo field while the Description field is attached to the transaction which consists of 2 or
more splits. The same description should also come up if you open the transaction in another register that there is a
split to.  You can enter different information in the Memo field if you wish. 

I think the importer matches on the Description field for the transaction by tokenizing its content and matching to the
tokenized forms of the description field of existing transactions which is weighted along with the matching of amounts,
dates, etc. I don't think the Memo field is involved in matching AFAIK but I haven't checked the code out to see. Geert
may be able to comment on that as he is more familiar with the code than I am.

I think you can specify the Memo field in the multisplit format as well as the Description field. I am away from home at
the moment so I can't check for sure.

David



On Sat, 2019-03-23 at 19:07 -0500, Patrick wrote:
> Thank you again for this helpful information.
> 
> I did have one other question about this. When I enter a split transaction
> directly into GnuCash (by using the "Split" button), it allows me to give
> each split of that transaction its own description. Since - if I understood
> your explanation properly - the CSV importer uses the "Description" field
> to group consecutive transactions in the same split, does this mean that
> when I am importing transactions using "multi-split," that I can't give
> each split of the same transaction its own description, as I can when I am
> entering them manually?
> 
> Regards,
> Patrick
> 
> On Mon, Mar 18, 2019 at 11:36 AM Patrick <plafratt at gmail.com> wrote:
> 
> > That makes sense. Thank you for the very helpful response and the example.
> > 
> > Regards,
> > Patrick
> > 
> > On Mon, Mar 18, 2019 at 5:45 AM Geert Janssens <geert.gnucash at kobaltwit.be>
> > wrote:
> > 
> > > Op zondag 17 maart 2019 00:55:38 CET schreef Patrick:
> > > 
> > > > I would like to import split transacations from a CSV file. Based on the
> > > > help balloon for it, the "multi-split" option seems to be the way to do
> > > > this, but I am not sure how to use this option. Is there an example
> > > > somewhere of how to use this option?
> > > > 
> > > > To be specific, what I don't understand is that when the multi-split
> > > 
> > > option
> > > 
> > > > is disabled, I can set one column in the CSV to be the "Account", and
> > > > another column to be the "Transfer Account". Setting these two columns
> > > > allows me to specify the "credit" and "debit" accounts involved in the
> > > > transaction. However, when I enable the multi-split option, the option
> > > 
> > > to
> > > 
> > > > set a "Transfer Account" goes away. So, I am not sure how to specify the
> > > > second of the two accounts involved with the transaction when
> > > 
> > > multi-split
> > > 
> > > > is enabled.
> > > 
> > > 
> > > 
> > > First off, strictly speaking each transaction is "multi-split" as even
> > > the simplest transaction (a transfer from one account to another) has two
> > > splits: one in the source account and one in the target account. The split
> > > itself doesn't know about the transfer. It only knows which account it
> > > belongs to.
> > > 
> > > 
> > > 
> > > As a real example is always more helpful, let's assume a transaction that
> > > transfers $100 from Account A to Account B. This would be represented with
> > > two splits:
> > > 
> > > 
> > > 
> > > Transaction date 2019-03-18
> > > 
> > > Transaction description "Transfer"
> > > 
> > > Split 1: Account A $100 (Withdrawal)
> > > 
> > > Split 2: Account B $100 (Deposit)
> > > 
> > > 
> > > 
> > > Converting this in a multi-split csv file that can be imported would
> > > yield something like this:
> > > 
> > > Date,Description,Account,Deposit,Withdrawal
> > > 
> > > 2019-03-18,Transfer,Account A,,100
> > > 
> > > 2019-03-18,Transfer,Account B,100,
> > > 
> > > 
> > > 
> > > As you can see there is no need for a "Transfer Account" column in this
> > > case. Each split is associated with one account, you only have to define
> > > that account. GnuCash will use the transaction related fields (in this case
> > > only "Date" and "Description") to detect transaction boundaries. As both
> > > fields are identical on each line, GnuCash will assume both splits to be
> > > part of the same transaction.
> > > 
> > > 
> > > 
> > > The single-line import format is a shorthand that can only be used in
> > > case of transactions with at most two splits. For that situation each line
> > > represents such a full transaction and hence may hold information to define
> > > two splits. For that reason it also provides two Account assignments
> > > options (Account and Transfer Account) as each split in that transaction
> > > can have one. So the above translated into a single line csv file would
> > > look like this:
> > > 
> > > 
> > > 
> > > Date,Description,Account,Transfer Account,Deposit
> > > 
> > > 2019-03-18,Transfer,Account B,Account A,100
> > > 
> > > 
> > > 
> > > You could say the single line import format is a special case to simplify
> > > most imports from bank accounts while the multi-split format is more
> > > generic and the only format that will ever be able to import multi-split
> > > (that is more than two splits) transactions (1).
> > > 
> > > 
> > > 
> > > Regards,
> > > 
> > > 
> > > 
> > > Geert
> > > 
> > > 
> > > 
> > > (1) Note there are currently issues with the csv importer for
> > > multi-currency imports or stock imports. These will eventually be resolved
> > > allowing the multi-split format to import every kind of transaction gnucash
> > > supports internally.
> > > 
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
-- 
Dr David R Cousens
B.Sc, M.Prof. Acc., Ph.D., G.C.Ed



More information about the gnucash-user mailing list