Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.

If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping

Answers may be delayed for posts that do not include sufficient information.

Importing several cells into a checklist or as relationships

I have a number of columns in a table (xlsx) which describe the relationship between an artist and the subject of the piece (e.g. child, parent, spouse, friend,...)  the data in the column is either 'x' or empty. I'm having trouble conceptualizing the best import process. I would like for them to appear as a checklist in the UI which would imply a list. Do I do that as a refinery or can it be done directly through CA_table.element?  OTOH conceptually these are relations between two entities which is simpler to think about importing using a refinery to make the relationships but harder to think about how it appears in the UI. 


  • It sounds like a relationship, unless the checklist of roles lived on the relationship record between the two entities:
  • I agree for that use case and I think I know how to move forward with it.  

    I realize I have another set of fields that really are more taxonomic in nature and would very much lend themselves to being a checklist. So we return to "Do I do that as a refinery or can it be done directly through CA_table.element? " What should the list definition look like to ingest such data?

  • Each column that represents a value in the checklist would be mapped to the attribute within an import group. i.e.

    Mapping 1 ca_objects.my_checklist checklistGroup
    Mapping  2 ca_objects.my_checklist checklistGroup
    Mapping  3 ca_objects.my_checklist checklistGroup

    And you'll also need to convert the X to the appropriate list item code via the original values/replacement values column
  • (or ca_entities...not sure what table the new list is in)
  • hmmm
    I'm in a bit of structure/definition spaghetti

    ca_objects.panel_attrs attrsGroup x makers_a
    ca_objects.panel_attrs attrsGroup x makers_b
    ca_objects.panel_attrs attrsGroup x makers_c

    where panel_atts is a metadata element for my panel and makers_* are the "Identifier" for the list "concepts" in List panel_attributions

    I've tried a few variants of both what I used for CA_table.element and for the "value" (different fields in the concept description) to no avail.
    Any light you can shine on the proper way to be thinking about these constructs that will make it clear what to do?

  • If you send a sample of the data and the mapping we can take a look.
  • OK these files contain my two current problems. The one on this thread, Group=RelationsGroup and another which are the three objectSplitters, all create new objects but only the first one creates the relationship. (And that one leads to a bit of confusion:  Are CA relationships not reciprocal?  I can only see them in the quilt_block)

  • Shouldn't mapping rows 31 and 43 be entitySplitters? There are relationships to people. Is "Person" really an object type?

    For the relationsGroup rows you are mapping the Original Value as "x" but in the data the original value is not "x". It's "Buddy" for example. 

  • People could be entities but I had already gone down a path modeling them as objects so here we are. Refactoring them into entities is in my plan.  Would that fix the problem of not getting relations? (secondary question is why aren't there objectJoiners? since in the end I really want to be joining fields into an object as one can do with entities)

    Not sure where you are seeing "buddy" in the data except in the secondary heading row which is ignored in the importer.  The sample data doesn't have any buddies.  Friends and lovers, yes.
  • edited May 2017
    Ok in that case make sure you have a relationship type with the code "panel_maker" and "memorialized" and an object type with the code Person. If those are correctly in the system please share what the import log says under debug mode for these objectSplitters. An objectJoiner may not be necessary if you're just trying to include metadata. That can be mapped in the "attributes" parameter within the splitter.

    Are you trying to get the relationGroup info onto the "Person" record? If so it should be done as an attribute mapping.

  • yes I have those relation types and a Person object type. There is no log output in debug mode.

    no, the relation group is attached to the panel not the person. (actually the relation group is going to end up be relations once I can figure out the other problem but I have a larger set of attributes that I want to have as a list on panels so this issue needs to get fixed as well.


  • Your log folder must not have the correct permissions because there's always a log in debug mode. If you're running the import through the UI it should be writable by the web server.
  • Oh! *That* log file!  I didn't know it existed.  It has proved useful. I'm still stuck but I can describe the problem better.

    I have split my importer in two. First I import my panels as objects. Then I import the people as entities.  During the entity import I want to create relationships of various types based on 'x' or null in fields.  I am trying to do this using objectSplitters that look like


    The log tells me that the resulting object is described by 

    [0] => Array


                        [_type] => panel

                        [idno] => Array


                                [idno] => 03871-1


                        [_relationship_type] => maker_friend

                        [preferred_labels] => Array


                                [name] => x



    but creates an object (named x) and makes the relationship to it rather than the object I have already created (different name, same idno).  I've tried numerous incantations to change the name but I just keep ending up with 'x'. 

  • You need to map the splitter to a column that has the name or id of the object you are trying to link to. If the object already exists in the system you can map the splitter to the idno and include "matchOn": ["idno"].
  • I have tried a variant of that but what you suggest isn't possible.  the notion is to conditionally create relationships based on the content of a field.  I can't see how one maps a splitter from both a column with the id of the object and the conditional field except as indicated in 

    ca_objects buddies {"skipGroupIfEmpty":

    Where ^44 contatnis the id of the object being related to. Including "matchOn": ["idno"] doesn't help
  • Can you upload your latest mapping and the data? I want to be sure I'm understanding your issue.
  • Data is same as above in this thread.
    I am currently running panels_basic_mapping to generate panel objects then makers_basic_mapping to generate the panel maker entities and make the relationships.
    I end up with two sets of objects one all named x and having relationships, the other with all the correct metadata and no relationships.

  • Ok so in your entity mapping you need to map every objectSplitter to column 44. Within the parameters of every objectSplitter you need to include matchOn idno. Then, within each splitter you'll set the relationshipType to the column where the specific x is included, i.e. ^27 for Friend. For the friend splitter you'll translate x to the relationship type code in the original values/replacement values column. This will make is so that if an x is present the link will be made (after it's transformed with the replacement value). If no x is present a relationship won't be created because you won't have included a relationshipTypeDefault. You'll get a bunch of nasty errors because it wants to find a relationship type, but this is a hack so it's the best we can do!
  • That seemed like a plausible approach but no joy. I still get a new panel object for every attempt at making a relationship to an existing panel object.

    (Actually FWIW) the replacement values trick didn't work.  seems like ^27 gets the original value rather than the replacement value. I worked around that and the relationshipType problems by using a skipGroupIfEmpty on the column with an x and explicitly called the relationshipType that I wanted.

  • So the issue is resolved? Or you're still having problems? If it's the later please upload your mapping
Sign In or Register to comment.