Importing People data supplementing information in an existing database

Started by Pawel, January 25, 2022, 05:16:31 PM

Previous topic - Next topic

Pawel

As per discussion in https://www.photools.com/community/index.php?topic=12248.0 I think it would be of great utility to add a function to import people data from JSON file that would work as follows:

  • if JSON contains a person with an existing id, then the entry of the person is supplemented with fields from the JSON file (only those fields that are available in the Person Editor, so that the user does not accidentally destroy the data like face assignments whose consistency is ensured by IMatch),
  • if the JSON contains a person with no id, then a new entry is created,
  • if the JSON contains a person with a non existing id or there are unknown/disallowed fields in the person record then the entry is ignored.

hluxem

+1

This issue of managing person data has come up before. Even if you only have 100 persons, changing entries or reviewing data for consistency is cumbersome without a table or list view. I too did use a json file for the initial person set up, too bad that I can't use the export/import feature to review and modify person data. I personally would prefer a CSV import/export file as I'm more familiar with them.

Mario

CSV would be very hard to do because the entity data type IMatch manages for persons has to support multiple instances for each property - but CSV allows for only one row per record. This woulds be a real mess.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

voronwe

+1

I would really like to have the possibilty to edit the JSON-Data outside IMatch.
With this one it would be easier to set additional informations, e.g. relations between persons by a "Stammbaum".
This information does not be used in IMatch, but at least shown in the comments of a person

voronwe

Quote from: hluxem on January 26, 2022, 01:02:07 AM
+1

This issue of managing person data has come up before. Even if you only have 100 persons, changing entries or reviewing data for consistency is cumbersome without a table or list view. I too did use a json file for the initial person set up, too bad that I can't use the export/import feature to review and modify person data. I personally would prefer a CSV import/export file as I'm more familiar with them.

JSON is much more flexible than CVS. It is better human-readable, it is structured, supports Lists, and also the order of the entries is not important.
And it is the de-facto-standart for data-exchange between Applications, so there are a lot of libraries outside which do the parsing for you.

hluxem

QuoteCSV would be very hard

No need to change the export/import feature from Json to csv. I just mentioned it because I have not worked much with Json files so far.
I have about 500 persons in my database and it would be a great help to edit the data outside of Imatch and then import and update the data.

Mario

CSV cannot hold the data, it does not do repeatable elements etc. CSV is for simple tables (Excel), not for structured objects.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook


Damit

I thought we were supposed to use the "Like" button, but since no one is doing so....
+1