Hi Madhan,
A couple of questions about this approach.

1)   When you say  AtlasRelatedObjectId or 
Collection<AtlasRelatedObjectId> as the relationship type - are you 
suggesting we should support both ? I cannot think of a case where we 
might need the Collection. 
2) On displayText - I was talking with Mandy. she brought up the point 
that the entity level should not be concerned with what is displayed and 
what is not. This is an OMAS consideration. At the entity level if the 
qualified name was shown as part of the unique attributes in the 
AtlasObjectId; this would work for my use case. I have raised this in Jira 
1991. I suggest we remove displayText from AtlasRelatedObjectId. 

I am OK with this suggestion if the above 2 points are addressed. 
 
    all the best, David. 



From:   Madhan Neethiraj <mad...@apache.org>
To:     David Radley <david_rad...@uk.ibm.com>, Graham Wallis 
<graham_wal...@uk.ibm.com>, Sarath Subramanian <sar...@apache.org>
Cc:     "dev@atlas.apache.org" <dev@atlas.apache.org>
Date:   24/07/2017 23:57
Subject:        Re: Relationship attributes
Sent by:        Madhan Neethiraj <mneethi...@hortonworks.com>



David,

I would suggest going with the following:

class AtlasEntity {
  // ...
  Map<String, Object> attributes;
  // ...
  Map<String, Object> relationships; // Object type can be either 
AtlasRelatedObjectId or Collection<AtlasRelatedObjectId>
}

class AtlasRelatedObjectId extends AtlasObjectId {
  String      relationshipGuid;
  AtlasStruct relationshipInfo; // has 2 members: typeName, attributes
  String      displayText;
}

Thanks,
Madhan

On 7/24/17, 8:42 AM, "David Radley" <david_rad...@uk.ibm.com> wrote:

    Hi Madhan,
    I agree with you that AtlasRelationshipObjectId could be confusing; 
good 
    point. 
 
    I am thinking 
    - relatedEntities is a good name if we want to focus on the target 
    entities; in this case it makes sense to extend the objectid - as this 

    focuses on the target entity. I think this might be a bit confusing as 

    there could be multiple relationships to the same target guid. The 
type 
    and guid that we inherit has no context; we need to know that they 
refer 
    to the target entity. 
    - relationships is a good name if we want to focus on the 
relationship; in 
    that case it makes sense to the have the relationship specific 
information 
    as top level and the referred to entity as embedded; which gives 
context 
    to the guid and type. The content is effectively one ends view of the 
    relationship. 
 
    I can see both ways; I am marginally on the relationship rather than 
    referredEntities; as you will have seen I have coded this up based on 
your 
    +1! I can redo this if the you and the community prefer the 
    relatedEntities. 
 
     all the best, David 
 
 
 
 
 
 
 
    From:   Madhan Neethiraj <mad...@apache.org>
    To:     David Radley <david_rad...@uk.ibm.com>, "dev@atlas.apache.org" 

    <dev@atlas.apache.org>
    Cc:     Sarath Subramanian <sar...@apache.org>, Graham Wallis 
    <graham_wal...@uk.ibm.com>
    Date:   24/07/2017 16:16
    Subject:        Re: Relationship attributes
    Sent by:        Madhan Neethiraj <mneethi...@hortonworks.com>
 
 
 
    As I said earlier, I prefer “relatedEntities” – as this name states 
that 
    the values in this attributes are references to entities. I think 
    “relationships” is good as well. However, I would prefer to use 
    “AtlasRelatedObjectId” instead of “AtlasRelationshipObjectId” – as 
    “RelationshipObjectId” might be confused with an instance of a 
    relationship. Also, I think we should have “AtlasRelatedObjectId” 
extend 
    “AtlasObjectId” (instead of embedding as an attribute).
 
    Thanks,
    Madhan
 
 
    From: David Radley <david_rad...@uk.ibm.com>
    Date: Monday, July 24, 2017 at 3:39 AM
    To: "dev@atlas.apache.org" <dev@atlas.apache.org>
    Cc: Madhan Neethiraj <mneethi...@hortonworks.com>, Sarath Subramanian 
    <sar...@apache.org>, Graham Wallis <graham_wal...@uk.ibm.com>
    Subject: Re: Relationship attributes
 
    Hi all, 
    I have just had a chat with Graham. we are thinking that we should go 
with 
    relationships as the top level name. We also think we could helpfully 
add 
    in the related entity in the new class like this: 
 
    class AtlasRelationshipObjectId  { 
       AtlasObjectId relatedEntity; 
      String relationshipGuid;
      AtlasStruct relationshipAttributes; 
    }
 
    I think this gives us the best of both worlds, 
               regards David. 
 
 
 
 
 
    From:        Graham Wallis <graham_wal...@uk.ibm.com> 
    To:        dev@atlas.apache.org 
    Cc:        Madhan Neethiraj <mneethi...@hortonworks.com>, Sarath 
    Subramanian <sar...@apache.org> 
    Date:        24/07/2017 09:58 
    Subject:        Re: Relationship attributes 
 
 
 
 
    Personally I think 'relatedEntities' is clearer.
 
    Best regards,
     Graham
 
    Graham Wallis
    IBM Analytics Emerging Technology Center
    Internet: graham_wal...@uk.ibm.com 
    IBM Laboratories, Hursley Park, Hursley, Hampshire SO21 2JN
    Tel: +44-1962-815356    Tie: 7-245356
 
 
 
 
    From:   Madhan Neethiraj <mad...@apache.org>
    To:     "dev@atlas.apache.org" <dev@atlas.apache.org>, Sarath 
Subramanian 
    <sar...@apache.org>
    Date:   24/07/2017 09:04
    Subject:        Re: Relationship attributes
    Sent by:        Madhan Neethiraj <mneethi...@hortonworks.com>
 
 
 
    Current name of ‘relationshipAttributes’ makes sense looking from an 
    entity point-of-view – it distinguishes regular-attributes of an 
entity 
    from attributes injected by relationships. However, given that 
    relationships can themselves might have attributes, it can be 
confusing.
 
    I was going to suggest ‘relatedEntities’; but ‘relationships’ seems to 
be 
    good choice.
 
    +1 for naming the field as ‘relationships’.
 
    Thanks,
    Madhan
 
 
    On 7/24/17, 12:53 AM, "David Radley" <david_rad...@uk.ibm.com> wrote:
 
       Hi Sarath,
       Great, personally for the Entity's current relationshipAttributes, 
I 
       prefer relationships as it is simpler - is there a reason you need 
       attribute in the name?
            all the best, David. 
 
 
 
       From:   Sarath Subramanian <sar...@apache.org>
       To:     dev@atlas.apache.org
       Cc:     Madhan Neethiraj <mad...@apache.org>
       Date:   24/07/2017 07:09
       Subject:        Re: Relationship attributes
 
 
 
       Hi David,
 
       I agree with using the term 'relationship attributes' for 
attributes 
    of
       relationship, I suggest we use "relatedAttributes" for relationship
       attributes of entity.
 
 
       Thanks,
       Sarath Subramanian
 
       On Sun, Jul 23, 2017 at 2:22 AM, David Radley 
    <david_rad...@uk.ibm.com>
       wrote:
 
       > Hi Madhan,
       > When I see the phrase 'relationship attributes', I am never quite 

    sure
       > whether we are referring to the attributes of an entity that 
relate 
    to
       > another entity or the attributes of the relationship instance 
    itself. I
       > think the phrase ' relationship attributes' more naturally fits 
as 
    the
       > attributes of the relationship itself; we are using it in the 
other 
       sense.
       >
       > I suggest we change the relationshipAttributes in the entity to
       > relationships (if you really want attributes in the name we could 

    call 
       it
       > relatingAttributes)- and use the term 'relationship attributes' 
    purely 
       for
       > the attributes of the relationship itself. What do you think?
       >                 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
       >
 
 
 
       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
 
 
 
 
 
    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
 
 
 
 
    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
 
 
 
    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
 
 






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

Reply via email to