You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are exporting Thesauri from an Arches (7.5.4) environment that our users configured into another new Arches (7.6.6) environment which will replace the previous one.
However, some of the Thesauri are incorrectly saved as orphaned concepts during the import. We have about a hundred of concepts and a lot of them are more than one level (ConceptScheme > Concept > Concept). Obviously, for the issue, we simplified the example.
Sorry in advance if we went overboard with the issue description 🤓, we are still new using Arches and wanted to be sure to document all we could.
based on the 5098-thesaurus.xml provided in the tests
we removed 1 sub-level and 1 concept to have a smaller example
No changes to the remaining options
Click on Upload File
Or, we also found a way through the UI which may have been done by mistake by our users. By creating a ConceptScheme that is moved into a child Concept of another existing ConceptScheme :
Alternative way
Go into the Reference Data Manager
Create the concepts
Click on Tools > Add Thesauri
ConceptScheme Name: Test Thesaurus
No changes to the remaining options
Click on Save changes
Click on Tools > Add Thesauri
ConceptScheme Name: Top
No changes to the remaining options
Click on Save changes
Click on Top
Click on Manage > Manage parents
Search for : Test Thesaurus
Click on Save
Click on Tools > Add Thesauri
ConceptScheme Name: Concept 1
No changes to the remaining options
Click on Save changes
Click on Concept 1
Click on Manage > Manage parents
Search for : Top
Click on Save
Refresh the page
Click on Tools > Export Thesauri
Select : Test Thesaurus
Click on Export
Save the generated file
Click on Tools > Import Thesauri
Select the previous saved file
No changes to the remaining options
Click on Upload File
See Actual behavior below
Or, it can also be done after the import. By making the orphan concept a ConceptScheme and placing it back into a child Concept of another existing ConceptScheme :
Alternative way 2
Doing the Reproduction Steps above with the aforementioned file
Create the concepts
Click on Concept 1
Click on Manage > Manage parents
Delete the parent relation : ORPHANS - Test Thesaurus
Click on Save
Click on Concept 1
Click on Manage > Manage parents
Search for : Top
Click on Save
Click on Tools > Delete Thesauri
Select : ORPHANS - Test Thesaurus
Click on Delete
Click on Tools > Export Thesauri
Select : Test Thesaurus
Click on Export
Save the generated file
Click on Tools > Import Thesauri
Select the previous saved file
No changes to the remaining options
Click on Upload File
See Actual behavior below
Expected behavior
The Thesauri are imported without any issue.
Actual behavior
The Thesauri are incorrectly saved as orphaned concepts after the import.
The exported file seems invalid.
We are still new to the SKOS format, but from our understanding of 4.6.3. Top Concepts and Semantic Relations, hasTopConcept should be used under ConceptScheme, not under Concept.
We may have found a workaround here to fix the import. We will post after testing it. EDIT : See below for the workaround.
Looking up into the database
Nothing too fancy, select into the Concepts and Relations tables for the guid referenced in the SKOS file :
Important! One of the alternatives through the UI mentioned in the Reproduction Steps above were done before running the queries.
Concepts
select*from concepts where conceptid in ('77d9d36e-054a-47a3-96c0-4165872a2d5d','467f6269-1f04-410e-b4f6-5a46a1ed0bf8','0bb450bc-8fe3-46cb-968e-2b56849e6e96');
select*from relations where conceptidto in ('77d9d36e-054a-47a3-96c0-4165872a2d5d','467f6269-1f04-410e-b4f6-5a46a1ed0bf8','0bb450bc-8fe3-46cb-968e-2b56849e6e96');
hasTopConcept is okay for 77d9... -> 467f..., but not for 467f...-> 0bb....
For the same reason mentioned about the SKOS reference.
However, this proves that the export process is fine, since it follows what the database told it.
Looking through the code of the managed_parents flow
The UI cannot be informed that the ConceptScheme will be changed into a Concept on save.
So, the relationship type is limited to the available values for a ConceptScheme which then save hasTopConcept into the database for a Concept. This may be the root cause? We would like some feedback from the community if any of this make sense.
We need to validate on our end, but we believe that we are able to help in some way or another.
The text was updated successfully, but these errors were encountered:
Description
Hi all,
We are exporting Thesauri from an Arches (7.5.4) environment that our users configured into another new Arches (7.6.6) environment which will replace the previous one.
However, some of the Thesauri are incorrectly saved as orphaned concepts during the import. We have about a hundred of concepts and a lot of them are more than one level (
ConceptScheme
>Concept
>Concept
). Obviously, for the issue, we simplified the example.Reproduction Steps
Tools
>Import Thesauri
Upload File
Or, we also found a way through the UI which may have been done by mistake by our users. By creating a
ConceptScheme
that is moved into a childConcept
of another existingConceptScheme
:Alternative way
Tools
>Add Thesauri
Save changes
Tools
>Add Thesauri
Save changes
Top
Manage
>Manage parents
Save
Tools
>Add Thesauri
Save changes
Concept 1
Manage
>Manage parents
Save
Tools
>Export Thesauri
Export
Tools
>Import Thesauri
Upload File
Or, it can also be done after the import. By making the orphan concept a
ConceptScheme
and placing it back into a childConcept
of another existingConceptScheme
:Alternative way 2
Concept 1
Manage
>Manage parents
Save
Concept 1
Manage
>Manage parents
Save
Tools
>Delete Thesauri
Delete
Tools
>Export Thesauri
Export
Tools
>Import Thesauri
Upload File
Expected behavior
The Thesauri are imported without any issue.
Actual behavior
The Thesauri are incorrectly saved as orphaned concepts after the import.
Configuration
OS
cat /etc/os-release
Python
python -V
Arches
pip show arches
Other information
We did some trial and error to determine where the root cause was :
manage_parents
flow.Validity of the SKOS file
File excerpt
The exported file seems invalid.
We are still new to the SKOS format, but from our understanding of 4.6.3. Top Concepts and Semantic Relations,
hasTopConcept
should be used underConceptScheme
, not underConcept
.Looking up into the database
Nothing too fancy, select into the
Concepts
andRelations
tables for the guid referenced in the SKOS file :Concepts
This one is all good.
Relations
hasTopConcept
is okay for77d9...
->467f...
, but not for467f...
->0bb...
.For the same reason mentioned about the SKOS reference.
However, this proves that the export process is fine, since it follows what the database told it.
Looking through the code of the
managed_parents
flowHi-level flow
The UI cannot be informed that the
ConceptScheme
will be changed into aConcept
on save.So, the relationship type is limited to the available values for a
ConceptScheme
which then savehasTopConcept
into the database for aConcept
.This may be the root cause? We would like some feedback from the community if any of this make sense.
The text was updated successfully, but these errors were encountered: