I am attempting to use CA to organize over 100 years' worth of architectural drawings and I'm having trouble importing records and matching them up with pre-populated places. I feel that this is important information given the subject matter and would greatly appreciate some help. CA seems like the perfect tool for the job, especially how easily we can make certain projects public through Pawtucket.
My Question:
How do you correctly map to pre-existing places by idno in CA 2.0 import mappings?
What is the proper syntax/refinery/options combination to make CA:
1) Look up an existing place by its idno field (e.g., "HOLLY_RIDGE")
2) Link the imported object to that existing place with a specific relationship type
3) NOT create a new blank place
I've successfully linked entities and storage locations using matchOn, but the same approach doesn't work for places. Is there a different mechanism for place relationships?
Environment:
CollectiveAccess 2.0
Importing architectural project records (ca_objects type: file)
Places pre-populated via separate import (46 places in hierarchical structure)
My Goal: Link imported objects to existing places using place idno
What Works:
Entity and storage location relationships work perfectly with this syntax:
Entities (working):
Source column: Entity ID (contains: RICHLAND_PARISH_SCHOOL_BOARD)
CA table.element: ca_entities
Options: {"dontCreate": 1, "matchOn": ["idno"]}
Settings: type=org, relationship_type=owner
Result: ✓ Found existing entity
Storage Locations (working):
Source column: Storage Location (contains: SPSS.420.B.1C)
CA table.element: ca_storage_locations
Options: {"matchOn": ["idno"]}
Settings: type=box, relationship_type=is located at
Result: ✓ Found existing storage location
What Doesn't Work
All of the following approaches create new [BLANK] places instead of linking to existing places:
Attempt 1: Direct mapping to ca_places
Source column: Place ID (contains: HOLLY_RIDGE)
CA table.element: ca_places
Result: Created new place [BLANK]
Attempt 2: Mapping to ca_places.idno field
Source column: Place ID
CA table.element: ca_places.idno
Result: Created new place [BLANK]
Attempt 3: Using placeService refinery
Source column: Place ID
CA table.element: ca_places
Refinery: placeService
Parameters: {"dontCreate": 1}
Result: Created new place [BLANK]
Attempt 4: Using matchOn without relationshipType
Source column: Place ID
CA table.element: ca_places
Options: {"matchOn": ["idno"]}
Result: Created new place [BLANK]
Attempt 5: Using matchOn with relationshipType
Source column: Place ID
CA table.element: ca_places
Options: {"relationshipType": "was created at", "matchOn": ["idno"]}
Result: Created new place [BLANK]
Attempt 6: Using treatAsIdentifiersForMatchOn
Source column: Place ID
CA table.element: ca_places
Options: {"treatAsIdentifiersForMatchOn": ["idno"], "dontCreate": 1}
Result: Created new place [BLANK]
Attempt 7: Mapping to ca_objects.place with placesSplitter refinery
Source column: Place ID
CA table.element: ca_objects.place
Refinery: placesSplitter
Refinery Parameters: {"hierarchyDelimiter": ";", "matchOn": ["idno"], "placeType": "city", "relationshipType": "was created at"}
Result: No place relationship created (data went into text field instead)
Attempt 8: Moving refinery params to Options column
Source column: Place ID
CA table.element: ca_objects.place
Options: {"hierarchyDelimiter": ";", "matchOn": ["idno"], "placeType": "city", "relationshipType": "was created at"}
Refinery: placesSplitter
Result: No place relationship created (data went into text field)
Attempt 9: Back to ca_places with all correct options
Source column: Place ID
CA table.element: ca_places
Options: {"relationshipType": "was created at", "matchOn": ["idno"], "dontCreate": 1}
Result: Created new place [BLANK]
Additional Context
Existing places verified in database:
place_id: 209, idno: HOLLY_RIDGE, name: Holly Ridge (type_id: 98, deleted: 0)
place_id: 210, idno: SPRINGVILLE, name: Springville (type_id: 98, deleted: 0)
All places have proper labels in ca_place_labels with is_preferred=1
Valid relationship types confirmed:
From Install Profile → Relationship Types → object ⇔ place relationships:
depicts / is depicted by
describes / is described by
location / was location of
was created at / was creation location of
Note on metadata elements:
I have a georeference element (datatype: Geocode) bound to objects, but this is for lat/lon coordinates, not place relationships. There does not appear to be a metadata element specifically for place relationships - they should be created via the relationship table.
Content tree structure (from import log):
[ca_places] => Array
(
[0] => Array
(
[relationship_type] => was created at
[matchOn] => Array ( [0] => idno )
[ca_places] => HOLLY_RIDGE
)
)
Import log shows:
[ROLL-001-1C] Started insert of ca_places for idno ROLL-001-1C
[ROLL-001-1C] Created new place [BLANK]
No "Found existing place" message like we see with entities and storage locations.
Additional observations:
1) All place mapping attempts create [BLANK] places OR store the idno value in a text field instead of creating relationships.
2) The content tree shows the correct parameters (_matchOn, _relationship_type, etc.) but CA doesn't process them
No "Found existing place" messages appear in logs (unlike entities/storage which log "Found existing entity/storage location").
3) Mapping to ca_objects.place with placesSplitter refinery doesn't invoke the refinery - data goes into a simple text field instead
Any guidance would be greatly appreciated!