export relationship typenames

Hi, in an export mapping (related to ca_objects) what I can write in the source column to extract the relationship typename or the relationship_type_code of a relationship to an entity (e.g. owner, maker etc)?

I have tried with many solutions

es. ca_objects_x_entities.relationship_type_code, ca_objects_x_entities.relationship_type_name

but with no success.

Thanks a lot

King Julien

University of Turin,

(submitters of the sparql end point ca plugin)

Comments

  • Probably it is not possible, and the only way is to mention the relationship id through ca_objects_x_entities.type_id, right?
    


  • Hi,

    I'd just use a template to output it. Eg. set up an mapping to output the relationship data and then specify a display template. Alternatively, you could set context to ca_objects_x_entities and then output ca_relationship_types.preferred_labels.typename.

  • It works perfectly, thank you Seth. A follow up question if I may abuse of your kindness:

    In my test export mapping, relative to ca_objects (type musical_instruments) I am struggling to switch the context only to objects related to objects (a self relation) limited to a subset of objects to objects relationships (e.g. an object that is "part" of a instrument or "accessory" of an instrument, as properly configured in my system).

    I know the relationship type id (number) and I understand that I should use JSON in the options column, but it is not clear to me how to refine the JSON option extracting only relevant self relationship. I have tried the configuration here attached (I have extracted only a bit) but it does not work as it seems to select both forward and reverse self relations, and I just need the forward ones in this case.

    sorry if this is treated somewhere, I am new to exports/import mappings.

    King Julien (University of Turin)

Sign In or Register to comment.