ImportText requiring explicit user calculated codes for Families

Apologies if I’ve missed this in documentation, or know bugs, but having successfully imported new People with the gramplet ImportText just leaving an empty field in my CSV/Text, I was surprised when I came to importing families, leaving the equivalent field blank

image

generated this error:

image

I get the same error if I use ‘Family’ as a header, instead of ‘Marriage’ - one last try

Might it happen for other types of import? I’m working from the model of CSV output from the examples database. I guess I should import children, from text like this

image

into the Families category as well

Known issues?

You want to have the base data in the same import cycle …or reference known-to-exist IDs in the Tree. The Square Brackets cause it to check the reference ID against the existing IDs. If that ID exists, the import data is used to update ( rather than creating a clone if that ID was not found)

In the following example, there are several tables. The People are created first. (So that their temporary IDs will exist and can be referenced in subsequent tables.) Then the Marriage Events. (It isn’t great that the Event uses a Source rather than a Citation within a Source. But no Citation options exist in the Import Text gramplet yet.) The marriage Events automatically create Families. And since the ’Father’ & 'Mother’ header labels have gender specific Roles for the parents, it also updates the Genders.

Then Individuals are inserted as Children of those marriages.

Try importing this CSV text instead:

Person, Given, Surname, Gender
[I0074],John,Smith
[I0075],Jane,Jones
[I0076],Judge,Crater,male
[I0077],Amelia,Earhart,female
[I0078],Tom,Ford
[I0079],Mary,Chandler

Marriage, Father, Mother, Date, Source, Relationship
[F0054],       [I0074],      [I0075], bef 1759-02-21, Virginia Marriage Licenses, Married
[F0055],       [I0078],      [I0079], bef 1759-02-09, Georgia Marriage Licenses,  Married

Family, Child
[F0054],       [I0076]
[F0055],       [I0077]

Thanks. I’m happy enough to work out new [  ] ids.

Do I put all that text for the ImportText Gramplet in the People section, including the family and children data?

I’m doing a fair amount of prep in Excel, which maybe done faster with other gramplets, mainly trying to eliminate introducing duplicates. So code to measure how close variant spellings are, including how they sound. But maybe that can wait

The entirety (will all 3 distinct CSV blocks of text) goes into a single Import Gramplet text field. You process them all at once … since trying to process them separately causes contextual confusion to the Gramplet.

My most recent test data was to make an example family export it to CSV. (The export was used the example.gramps tree filtered to the people within 1 degree of separation from the Home Person.) Then pasted the resulting CSV text into an instance of the Import Text Gramplet. — with absolutely NO editing.

It dropped quite a bit of information during the export phase: all names but the primary row of multiple surnames, Notes, Events outside of birth/baptism/death/burial, and (most importantly to me) the Citations.

(The reason the Citation was my key issue is: I wanted to use the Text Import to quickly add Biographical notes from Obituaries. Figured I could sketch out a set of dated residences for surviving family members and cite that obit. No joy.)

But the test yielded a good example of the format to use when importing CSV through the Gramplet.

1 Like

I’ve got two tabs here in Excel with my own [Ixxxx] codes, which should be good to use with ImportText

The ‘Baptisms for ImportText’ is the result of some preprocessing of a Word table typed up by a friend with baptisms, names of parents and some occupation and residence data. The result is four blocks for ImportText, the first two persons, the child baptised, then their parents, and the last two the marriages between the parents, and then the relationship of the baptised child to these marriages. I did the preprocessing manually, but I could write some Python, outside GRAMPS, to speed it up.

HOWEVER, my counter for persons is up to 1,750, and there are going to be loads of duplicates, so I’m also going to write some Python to catch as many of these as I can before upload. I know there are tools in GRAMPS to find possible duplicate people which I could fall back on post upload, but I think this will be quicker. I’m going to use some manual lists of standardised spellings for surnames and first names, and hopefully this Python package thefuzz

Thoughts? Hope this is of interest. I’ll keep you posted

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.