Transferring data between two Gnucash files

Derek Atkins derek at ihtfp.com
Thu Jan 12 14:23:06 EST 2012


Hi,

On Thu, January 12, 2012 2:01 pm, Jesse C wrote:
> ahh, now i understand how the import works.  Thanks.  That was a crucial
> piece of data (how the Category thing works).  Since I think there will be
> splits, I guess I'm going with QIF.  Hopefully tonight or tomorrow I'll
> get
> some time and knock out some test files and see if I can't get this
> rolling.
>
> I know there is some Bayesian learning in Gnucash for imports.  Will it
> automatically learn how to map Categories to I/E accounts over time?

QIF does not have Bayesian learning.  That's only for OFX.
However, QIF does have a MAP file where it learns your mappings from QIF
Account, Category, and Payee/Memo strings to GnuCash Accounts.  The key to
keep in mind is that these bindings are whole string compares, and that
they are per-qiffile-name.   So if you import Foo.qif and Bar.qif, the
mappings are different.  But if you import Foo.qif and then another
Foo.qif, the second time it will reuse the bindings you used the first
time.

As for the full-string compare, if you have a Payee of "Citgo 1234567" and
then "Citgo 2345678" it will not know that these are the same, so it wont
reuse the binding from one run to another.

-derek

> cheers
> jesse
>
> On Thu, Jan 12, 2012 at 10:08 AM, Derek Atkins <warlord at mit.edu> wrote:
>
>> Hi,
>>
>> Jesse C <crimson.corelio at gmail.com> writes:
>>
>> [snip]
>> > Uhm, I am trying to account (haha) for the double-entry part of it.
>> Going
>> > back to my original example, I want to import the following
>> transaction:
>> >
>> > (Liability Account) Husband A/L:Shared Expenses:Owed to Him:Merged
>> +50
>> > (Expense Account) Expenses:Housing:Rent  +50
>> >
>> > That's a fully balanced gnucash entry (or maybe it should be -50 for
>> the
>> > expense, if that's how you think about things.  Either way it is
>> increasing
>> > the expense # and driving the liability)
>> >
>> > I want to import that transaction using QIF files.  What I was hoping
>> to
>> be
>> > able to do is make one QIF account from the Liability account and one
>> for the
>> > Expense Account and have GnuCash match them up when I import them.  Is
>> that
>> > being too optimistic about the QIF importer?
>>
>> You don't need to do that.  All you need to do is create a QIF file for
>> the transaction from the Liability account.  E.g.:
>>
>> Husband.qif:
>> !Type:Oth L
>> P...
>> M...
>> N...
>> T50.00
>> LExpenses:Housing:Rent
>> ^
>>
>> This assumes that this is a Liability account.  If it's an asset then
>> you could use use !Type:Bank or !Type:Oth A.
>>
>> When you import this QIF file you map the Qif Account "Husband" to the
>> GnuCash Account "Husband A/L:Shared Expenses:Owed to Him:Merged".  And
>> the QIF Category "Expenses:Housing:Rent" to the GnuCash Account
>> "Expenses:Housing:Rent".  Eh viola.  You have your transaction imported.
>>
>> > Since I know every account before I start importing, on both sides of
>> the
>> > transactions, I can specify this.
>>
>> Correct.
>>
>> >     [snip]
>> >     > I don't need splits, but having looked at the syntax for OFX, I
>> have to
>> >     > agree that QIF is a much simpler format.
>> >
>> >     So you never import a Salary with Withholdings?  Okay.
>> >
>> > Hmm, there are transactions with multiple-splits.  I may need to use
>> OFX
>> > then.  Hopefully the java libraries are up to snuff.  Assuming that
>> what
>> I
>> > want to do is possible at all.
>>
>> No, you *CANNOT* use OFX then.  OFX does not support that.  QIF Can.
>> You just need to add the S, M, and $ tags to specify the split
>> categories instead of using L.
>>
>> > cheers
>> > jesse
>>
>> -derek
>>
>> --
>>       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>>       Member, MIT Student Information Processing Board  (SIPB)
>>       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>>       warlord at MIT.EDU                        PGP key available
>>
>


-- 
       Derek Atkins                 617-623-3745
       derek at ihtfp.com             www.ihtfp.com
       Computer and Internet Security Consultant



More information about the gnucash-user mailing list