You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Sidharth Kumar Mishra (Jira)" <ji...@apache.org> on 2021/05/17 23:22:00 UTC

[jira] [Commented] (ATLAS-4287) [Atlas: Glossary Term Bulk Import] When there is self-reference in the input, bulk import is broken

    [ https://issues.apache.org/jira/browse/ATLAS-4287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17346477#comment-17346477 ] 

Sidharth Kumar Mishra commented on ATLAS-4287:
----------------------------------------------

Before the next import happens, please do the initial import of the related terms with the following input
{code:java}
GlossaryName, TermName, ShortDescription, LongDescription, Examples, Abbreviation, Usage, AdditionalAttributes, TranslationTerms, ValidValuesFor, Synonyms, ReplacedBy, ValidValues, ReplacementTerms, SeeAlso, TranslatedTerms, IsA, Antonyms, Classifies, PreferredToTerms, PreferredTerms
glossaryBulkImport_1,termBulkImport_1
glossaryBulkImport_1,termBulkImport_2{code}
Now with the below payload I tested and self-reference gives error message as expected.
{code:java}
GlossaryName, TermName, ShortDescription, LongDescription, Examples, Abbreviation, Usage, AdditionalAttributes, TranslationTerms, ValidValuesFor, Synonyms, ReplacedBy, ValidValues, ReplacementTerms, SeeAlso, TranslatedTerms, IsA, Antonyms, Classifies, PreferredToTerms, PreferredTerms
dharshmk_11,term_2,"short desc","long description", "Example", "G1", "Usage", "glossary:100%",,,,,,,,,,,,,"dharshmk_11:term_2|glossaryBulkImport_1:termBulkImport_1|glossaryBulkImport_1:termBulkImport_2"{code}
Response as expected:
----
{
   "failedImportInfoList": [
   

{    "parentObjectName": "dharshmk_11",    "childObjectName": "term_2",    "importStatus": "FAILED",    "remarks": "Invalid Term relationship: Term cant have a relationship with self"    }

   ],
   "successImportInfoList": [
   

{     "parentObjectName": "dharshmk_11",     "childObjectName": "term_2",     "importStatus": "SUCCESS",     "remarks": "\\{\"termGuid\":\"7e6e4be7-1dc3-43de-8c7b-5f853113e406\",\"qualifiedName\":\"term_2@dharshmk_11\"}

"
   }
   ]
}
For the mentioned csv payload where this doesn't work is due to the fact that PreferredToTerms relationship doesn't work as filed by https://issues.apache.org/jira/browse/ATLAS-4288 Jira. So closing this as duplicate of ATLAS-4288

> [Atlas: Glossary Term Bulk Import] When there is self-reference in the input, bulk import is broken
> ---------------------------------------------------------------------------------------------------
>
>                 Key: ATLAS-4287
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4287
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: Dharshana M Krishnamoorthy
>            Assignee: Sidharth Kumar Mishra
>            Priority: Major
>
> This was working on the previous build before that latest fix, but broken now.
> Scenario 1: Self-reference and Failure (2 failures expected at failedinfolist)
> {code:java}
> GlossaryName, TermName, ShortDescription, LongDescription, Examples, Abbreviation, Usage, AdditionalAttributes, TranslationTerms, ValidValuesFor, Synonyms, ReplacedBy, ValidValues, ReplacementTerms, SeeAlso, TranslatedTerms, IsA, Antonyms, Classifies, PreferredToTerms, PreferredTerms
> glossary_1,term_1,,,,,,,,,,,,,,,,,,"glossary_1:term_1|glossary_1:term_2",{code}
> Scenario 2: Self-reference and Success  (1 failure expected at failedinfolist)
> {code:java}
> GlossaryName, TermName, ShortDescription, LongDescription, Examples, Abbreviation, Usage, AdditionalAttributes, TranslationTerms, ValidValuesFor, Synonyms, ReplacedBy, ValidValues, ReplacementTerms, SeeAlso, TranslatedTerms, IsA, Antonyms, Classifies, PreferredToTerms, PreferredTerms
> glossary_1,term_1,,,,,,,,,,,,,,,,,,"glossary_1:term_1|glossary_1:term_2",
> glossary_1,term_2 {code}
> Scenatio 3: Only self reference  (1 failures expected at failedinfolist)
> {code:java}
> GlossaryName, TermName, ShortDescription, LongDescription, Examples, Abbreviation, Usage, AdditionalAttributes, TranslationTerms, ValidValuesFor, Synonyms, ReplacedBy, ValidValues, ReplacementTerms, SeeAlso, TranslatedTerms, IsA, Antonyms, Classifies, PreferredToTerms, PreferredTerms
> glossary_1,term_1,,,,,,,,,,,,,,,,,,"glossary_1:term_1", {code}
> In all these cases we expect failure message which mentions about self reference, this is currently broken.
> What makes this important is, in case of self-reference and success scenario, the relationship is not established
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)