1. Model file based type creation ensures that the models are available as soon 
as Atlas starts up and is ready.
2. RelationshipDefs in Atlas are used to define relation between the types, eg. 
Hive_table HAS hive_column(s), hive_db HAS hive_table(s) and so on
3. Relationships are used to inject dynamic attributes into the end1 or end2 
type.
4. For more explanation on RelationshipCategory please refer to the 
AtlasRelationshipDef class, the comments around RelationshipCategory should be 
self explanatory
5. ownedRef constraint is kind of a "containment" restriction, an ownedRef type 
can't exist without the entity/instance of the type that defines it and 
inverseRef is kind of a "reverse pointer" to the "container" type. 

e.g. hive_columns are ownedRef under hive_table that means a column entity 
can't exist without the presence of hive_table and it's inverseRef states that 
the type "hive_table" would have an attribute "columns" of type hive_column 

NOTE: If you want to build a model using relationships then you can ignore the 
attribute constraints "ownedRef" and "inverseRef". Relationships are 
recommended over traditional attributes definitions when trying to model custom 
types (starting from Atlas 1.0)

On 8/15/18, 9:44 AM, "anshu shukla" <anshushuk...@gmail.com> wrote:

    Hi,
    
    I have the following queries regarding the type system in Atlas.
    
    
       1. What is the diff between the new Type creation using the model file
       (JSON) and using the createClassTypeDef() function as done in quickstart
       example? And if both are same then which one is preferred one.
       2. Is there any place where I can read more about the
    
       *relationshipDefs* as discussed in the model files.....like -
    
       -
    
          What does *relationshipCategory* exactly means and how it is
    iterpreted by Atlas.
    
          -
    
          How can i define them in the Java code (same as in model file..)
    
          -
    
          What is correct interpretation of CONSTRAINT_TYPE_OWNED_REF,
    
          CONSTRAINT_TYPE_INVERSE_REF and CONSTRAINT_PARAM_ATTRIBUTE.
    
    
    
    
    -- 
    Thanks & Regards,
    Anshu Shukla
    

Reply via email to