You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Madhan Neethiraj <ma...@apache.org> on 2017/07/21 14:39:02 UTC

Re: Relationships diagnostics

David,

 

It will help if the error message can include the details like attribute name. Consider the following:

>  "invalid value for relationship attribute ‘terms’: entity specified (guid=000-111-222) could not be found"   
>  "invalid entity-type for relationship attribute ‘terms’: entity specified (guid=000-111-222) is of type ‘Glossary’, but expected type is ‘GlossaryTerm’ "   

 

About adding displayText to relationshipAttributes – Sarath and I discussed yesterday to use AtlasRelatedObjectId objects for relationshipAttributes instead of AtlasObjectId. This type would include details like attributes of the relationship itself – along with displayText, etc

 

.

 

class AtlasRelatedObjectId extends AtlasObjectId {

  String      relationGuid;

  AtlasStruct relationAttributes;

  String      displayText;

}

 

Sarath should be creating a JIRA shortly.

 

>> I suggest we add a displayname to each of the ends in the RelationshipDef

Instead of adding ‘displayTextAttributeName’ attribute to RelationshipDef ends, we should add this to AtlasEntityDef – so that it can be used to populate AtlasEntityHeader.displayText, which is used in other places like search results. Currently AtlasEntityHeader.displayText field is set to either ‘name’ or ‘qualifiedName’ attribute value.

 

Thanks,

Madhan

 

From: David Radley <da...@uk.ibm.com>
Date: Friday, July 21, 2017 at 3:01 AM
To: Madhan Neethiraj <ma...@apache.org>, Sarath Subramanian <sa...@apache.org>
Cc: "dev@atlas.apache.org" <de...@atlas.apache.org>
Subject: Relationships diagnostics

 

Hi Madhan and Sarath, 
I am playing with relationships and the glossary models. When I make mistakes I am finding it difficult to work out what I have done wrong or whether there is a bug somewhere. I intend to improve the diagnostics. The error I get back from an incorrect relationship creation is not very descriptive: 

 { 
    "errorCode": "ATLAS-400-00-01A", 
    "errorMessage": "invalid parameters: found null entity" 
} 

I will look into to add more specific error messages . Something like 
"guid 000-111-222 was specified on relationship 111-222-333 on end1 and could not be found"   
"guid 000-111-222 was specified on relationship 111-222-333 on end1 and was found, the expected type GlossaryTerm, but found type Glossary,"   



I think it would help in the relationshipAttributes if we could include a displayname. So I suggest we add a displayname to each of the ends in the RelationshipDef. The contents would be an attributename in the type. For example the displayname of a GlossaryCategory. I think this will be really useful when there are no unique attributes - like for GlossaryTerm and GlossaryCategory.   
We would then see these names in the entity relationship attributes. When the glossary entity is displayed the associated categories entires would have meaningful (but not unique) names in addition to the guid and type. 

I will go ahead with the error messages - are there any objections to including a displayname on the relationship endpoints? 
  all the best, David. 







   
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU