Skip to content

ImportCSV

Ryo Kawaguchi edited this page Mar 14, 2015 · 2 revisions

Instead of using XML-based write API, you can also use CSV import tool to import your data into a Person Finder repository if you maintain your data in a spreadsheet or other database that support CSV export. Visit the following URL with repository replaced with the repository ID to which you want to import your data.

https://www.google.org/personfinder/repository/api/import

How to import your data in CSV format

  • Download the sample CSV file, and open it in a spreadsheet software such as Microsoft Excel or Google Drive.
  • Delete the first sample record and replace with your own data.
  • When ready, export the spreadsheet to a CSV file, and upload the file from the CSV import page (see above for the URL).
  • You need to have an authentication key with write permission to import your data (request here).
  • Once the file is uploaded, you will see a report and optionally error messages why some records were not imported successfully.

How to update your data that is already imported

  • As long as person_record_id and note_record_id do not change, you can always edit the CSV file that is already imported, and upload it on the import page. Records with the same record ID are overwritten with the new data.

How to format CSV files for a successful import and a few tips

  • Each row corresponds to a Person record or Note record.
  • Optionally, a Person entry and a Note entry for the person may be combined into one row, in which case photo_url field is associated with the Person entry only, and the rest of the fields with identical name are associated with both the Person and Note entries.
  • The first header row specifies what should be entered in each field. See PFIF 1.4 specifications for the description of each field. Required fields are person_record_id, source_date, full_name for a Person record, and note_record_id, person_record_id, author_name, source_date, text for a Note record. The order of columns does not matter.
  • person_record_id and note_record_id should not contain a slash, Person Finder automatically prefixes those IDs with the domain registered with your authentication key and a slash.
  • All dates and times must be in UTC and in the format yyyy-mm-ddThh:mm:ssZ (TODO:ryok update instruction here)
  • For more details, please refer to the PFIF 1.4 specifications.
Clone this wiki locally