I am prototyping and testing import from M$ Access. Up to now I could quite easily import relationships, but I am missing the way to import also the relationship core Start date and custom fields I created in some relationship types. It seems like contact import is not prepared for this, right? So the only other way would be writing custom import scripts using the API? Any hints or documentation are appreciated!
From what I can tell this functionality is not available in core imports, which allow relationships to be imported as a side function (e.g. when importing contacts, you can specify relationships on the side).
There is an extension available called "CSV GUI Import to api" which allows more targeted imports, including one directly to Relationships.
I think you need to use Internal Contact IDs (I tried to find how to do it with external IDs and couldn't manage it), as well as having other info specified:
In the screenshot above (from the second field matching step), "Year" is a custom field that I added to a certain relationship type, and which can be imported to in this way. You can see the core date fields are also available.
Laryn's answer is good. The other popular method is the command-line CSV import tool: https://civicrm.org/blog/jamie/the-new-and-improved-cliphp-now-a-new-way-to-interact-with-api-v3
If you had a file that looked like this:
You could import it with:
php /path/to/civiroot/bin/csv/import.php -e Relationship --file /path/to/your.csv