The default database export is limited and does not include Descriptions or Notes attached to Events, Notes attached to Persons, or Addresses… How can I export everything into a CSV or XLSX file?
Each Event ID includes the Description field, so I should be able to export the Events data table, right? What about all the other data elements attached to a person?
‘# I don’t Python, so I don’t know how to look under the hood ’
'# [Gramps 5.1.3 MacOS Catalina]
Here are two options, both straightforward but not simple.
You could export to XML (uncompressed), if you know how to use XSLT to transform the data, or have other tools for processing XML, but that is not trivial.
You could export to SQLite (this is different than the underlying SQLite database that your tree is stored in). Even if you don’t know any SQL, it doesn’t take much effort within SQLite to simply dump each table to a csv file, but there are two complications. The first one is that the SQLite export does not include all of the translated strings that correspond to the numeric constant values (see this posting for details). If you don’t need those strings, then you don’t have to worry about that. The second complication is that you would need to relate (join) all of the individual csv files, using the “handle” columns which are included in the data. It seems like that would be a lot of effort in Excel. (Or if you know SQL, you can just create whatever joined views you like within SQLite and then export those to csv.)
I appreciate your response, George. There is no dispute that there is a lack of simplicity in your suggestions. I think I’ll rule out the XML option as too difficult to extract the data from in table form.
The SQLite sounds like a viable option, but my minimal experience with SQL is limited to performing queries. I am familiar with relational databases and have created/managed Access databases, but that with Access 2003 & earlier. It appears that Gramps may be (or is) a relational database, which I just basically want to extract/download the raw data tables. Is that how Gramps is built? Are the various IDs simply the key fields?
If so, I should be able to have the Individual/Person table as one sheet in Excel. Then using VLOOKUP to connect the Event and Location tables from a separate sheet, list all the details of each event for each person, right?
Can I extract each table with SQLite?
One objective is to print a report shows all relatives buried at a particular cemetery.
The backend database is SQLite, but the objects are stored in a “pickled” format (a Python thing) as BLOBs, so that is not useful unless you are using Python.
The SQL export is usable (apart from the lack of translated strings that I mentioned earlier). However, the key fields are not the various IDs, but rather unique “handles” which do not change, even if you change the IDs. Your VLOOKUPs or whatever could still work, just using a different column. But you will find that you need to connect several tables in succession just to get simple things such as all the pieces of a person’s name.
Yes, after creating the SLQite export, use SQLite commands as described here.
Or you can do the joins within SQLite using “CREATE VIEW … AS SELECT …” etc. and then just export the contents of the views instead of the individual tables.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.