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

Suma Shivaprasad edited comment on ATLAS-751 at 5/25/16 7:42 PM:
-----------------------------------------------------------------

The proposal is to add a PrimaryKeyConstraint on ClassType which allows the 
type modeller to

1. Specify the set of attributes in a given type which can uniquely identify an 
entity 
2. Whether its value needs to be displayed during entity definition retrievals( 
get on an entity)  - an isVisible flag 
3. if isVisible , then a displayFormat that could be used to configure how it 
should be displayed during entity gets


When a PrimaryKeyConstraint is defined on the class type,  the typesystem adds 
an extra attribute called "qualifiedName" which can be used to display the 
value during entity gets.
There is no support for configuring the attribute name which will be used to 
display the value since I think its better to have the same name as a 
convention across multiple entity types.


was (Author: suma.shivaprasad):
The proposal is to add a PrimaryKeyConstraint on ClassType which allows the 
type modeller to

1. Specify the set of attributes in a given type which can uniquely identify an 
entity 
2. Whether its value needs to be displayed during entity definition retrievals( 
get on an entity)  - an isVisible flag 
3. if isVisible , then a displayFormat that could be used to configure how it 
should be displayed during entity gets


When a PrimaryKeyConstraint is defined on the class type,  the typesystem adds 
an extra attribute called "qualifiedName" which can be used to display the 
value during entity gets.
There is no support for configuring which attribute name will be used to 
display the value since I think its better to have the same name as a 
convention across multiple entities.

> Add support for primary key constraint on class types
> -----------------------------------------------------
>
>                 Key: ATLAS-751
>                 URL: https://issues.apache.org/jira/browse/ATLAS-751
>             Project: Atlas
>          Issue Type: Improvement
>    Affects Versions: 0.7-incubating
>            Reporter: Suma Shivaprasad
>            Assignee: Suma Shivaprasad
>             Fix For: 0.7-incubating
>
>
> Persisting the qualified Name for an entity has multiple issues
> 1. In case of soft deletes,consider the following scenario
> a. Table A -> insert overwrite -> Table B
> If the table A  and B are dropped and recreated again and the insert 
> overwrite query is rerun, then it should create another lineage process since 
> the tables are different here. Similarly for CTAS etc. However the same 
> process will get updated due to the current way of storing qualifiedName 
> 2. Storing qualified names inherently leads to a lot of updates during 
> operations renames for eg: if a table is renames, all its 
> columns.qualifiedName, sd.qualifiedName etc get updated. If this is done with 
> partitions, then the updates will definitely take a lot of time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to