These are chat archives for collectiveaccess/support

4th
Oct 2017
Kurt Sussman
@neophiliac
Oct 04 2017 01:11
I'm getting the same result; no errors in the log, and 2 out of 17 columns get imported. Maybe I can work backwards from the edit form. How do I find out where the title comes from, for example? There is no 'title' in the metadata elements page, but there is a title on the form.
Kurt Sussman
@neophiliac
Oct 04 2017 01:17
The entityJoiner is not being skipped now, using rule type Mapping and skipping referenced columns like the sample mapping file does. The log shows 2017-10-03 18:09:34 - ERROR --> DatabaseException: Duplicate entry '2' for key 'u_word'
2017-10-03 18:14:06 - WARN --> [loadImporterFromFile:/tmp/phpYOl4tZ] Skipped mapping at row 3 because destination was not defined
It looks like the entityJoiner can't reference the column it's on; forename is column 2 and the source is also 2. Is there a repository full of working import mappings that I can study?
Kehan Harman
@kehh
Oct 04 2017 08:32
@neophiliac for a repository of working mappings there's https://github.com/rwahs/import-scripts/tree/master/importScripts. Those use MySQL Data Reader but it should give you an idea of usage. Also ensure you've got the destination set as 'ca_entities' (I wonder if that's what the WARN is about).
ca-ubos
@ca-ubos
Oct 04 2017 10:18
Referring to :point_up: September 14, 2017 4:05 PM – We solved the problem: When we imported our vocabulary lists, no type_id for list element types were set. We solved this by changing the values in SQL UPDATE ca_list_items SET type_id = 2 WHERE list_id = 76. Now hierarchy levels are not skipped any more.
Julia
@juliaweist
Oct 04 2017 14:13
@neophiliac see my note above about "intrinsics" (http://docs.collectiveaccess.org/wiki/Intrinsic_Bundles) -- this is where you'll find the code for things like title
Kurt Sussman
@neophiliac
Oct 04 2017 15:20
Thanks @juliaweist . I don't see title there. I'll read it again in a little while.
Julia
@juliaweist
Oct 04 2017 16:28
I'm sorry, title isn't on that page. Code is preferred_labels
Industrial Heritage
@MOIH_ma_twitter
Oct 04 2017 17:37
my import mapping for "existingRecordPolicy" is ignored for any "merge", "replace", or "skip" directive. Any setting just results in another record being inserted (even with duplicate idnos). Has anyone verified this feature to work in Providence 1.7.5?
Kurt Sussman
@neophiliac
Oct 04 2017 20:35
Thanks @kehh . I'm looking at those scripts now.
This message was deleted
@juliaweist where would I find preferred_labels? It's not listed on the intrinsic_bundles page.
Kurt Sussman
@neophiliac
Oct 04 2017 20:46
http://docs.collectiveaccess.org/wiki/Data_Import:_Creating_and_Running_a_Mapping shows a joiner using a source column in the refineryParameters, which appears to be what's giving me the error I pasted above.
2017-10-04 11:17:35 - DEBUG --> Could not create ca_entities record: Type must be spe
cified
2017-10-04 11:17:35 - ERROR --> Could not insert entity : Type must be specified
The types that I have found clearly aren't doing what I expect. The entity that the joiner builds looks odd to me in the debug output also. Where should I look for info on what this should look like and how to make it so? [ca_entities] => Array
(
[0] => Array
(
[preferred_labels] => Array
(
[forename] => Alexander
[other_forenames] =>
[middlename] =>
[surname] => John
[prefix] =>
[suffix] =>
[displayname] =>
)
                [_relationship_type] => artist
                [_type] => person
                [lifespan] => Array
                    (
                        [lifespan] => 1945
                    )

                [_errorPolicy] => ignore
            )

    )