[jira] [Comment Edited] (ATLAS-2178) Type Inheritance in conjunction with RelationshipDef fails to set legacy attributes
[ https://issues.apache.org/jira/browse/ATLAS-2178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16184647#comment-16184647 ] Pierre Padovani edited comment on ATLAS-2178 at 9/29/17 9:00 PM: - Update: If I set the property 'atlas.ui.editable.entity.types=*' to allow for custom types to be created from the UI, and create two entities (one on each side of the CustomerOwned defined relationship type) I can properly define the relationship on each side, and the data is set correctly. I would assume that this is due to the UI using the V1 API rather than making a call to the V2 Relationship API. That being said, my assumption was that if I set the legacy flag on the RelationshipDef the attributes that correspond to the field names in each end would be set correctly when the relationship instance was created. Tracing through the code during a create relationship call via the REST api, I see nothing that honors the legacy flag. (unless it is happening under the covers in the titan code.) was (Author: ppadovani): Update: If I set the property 'atlas.ui.editable.entity.types=*' to allow for custom types to be created from the UI, and create two entities (one on each side of the CustomerOwned defined relationship type) I can properly define the relationship on each side, and the data is set correctly. {code:java} { "enumDefs": [], "structDefs": [ { "name": "FingerprintSpecification", "typeVersion": "0.1", "attributeDefs": [ { "name": "tablesWithMetadataGlobs", "typeName": "array", "cardinality": "SINGLE", "isIndexable": false, "isOptional": true, "isUnique": false }, { "name": "tablesListGlobs", "typeName": "array", "cardinality": "SINGLE", "isIndexable": false, "isOptional": true, "isUnique": false } ] }, { "name": "PfKeyDefinition", "typeVersion": "0.1", "attributeDefs": [ { "name": "tableName", "typeName": "string", "cardinality": "SINGLE", "isIndexable": false, "isOptional": true, "isUnique": false }, { "name": "columns", "typeName": "array", "cardinality": "SINGLE", "isIndexable": false, "isOptional": true, "isUnique": false } ] }, { "name": "ComparisonFilter", "typeVersion": "0.1", "attributeDefs": [ { "name": "compareColumnNullability", "typeName": "boolean", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name": "compareColumnRemarks", "typeName": "boolean", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name": "compareColumnType", "typeName": "boolean", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name": "compareColumnSize", "typeName": "boolean", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name": "comparePrimaryKey", "typeName": "boolean", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name": "compareTableRemarks", "typeName": "boolean", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name": "compareRelationships", "typeName": "boolean", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false } ] }, { "name": "ScoreSpecification", "typeVersion": "0.1", "attributeDefs": [ { "name": "missingPrimaryKeys", "typeName": "float", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name": "changedColumnTypes", "typeName": "float", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name": "changedNullability", "typeName": "float", "cardinality": "SINGLE", "isIndexable": false, "isOptional": false, "isUnique": false }, { "name":
[jira] [Comment Edited] (ATLAS-2178) Type Inheritance in conjunction with RelationshipDef fails to set legacy attributes
[ https://issues.apache.org/jira/browse/ATLAS-2178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16184647#comment-16184647 ] Pierre Padovani edited comment on ATLAS-2178 at 9/28/17 6:54 PM: - Update: If I set the property 'atlas.ui.editable.entity.types=*' to allow for custom types to be created from the UI, and create two entities (one on each side of the CustomerOwned defined relationship type) I can properly define the relationship on each side, and the data is set correctly. {code:java} { "referredEntities": { "1f85676c-b0a5-45b3-b528-8420e5cae066": { "typeName": "SorSystem", "attributes": { "owner": null, "tables": null, "qualifiedName": "sor@cust1", "name": "sor", "description": null, "customer": { "guid": "bec94ddc-dec3-42cb-b1c3-b19dff655693", "typeName": "Customer" } }, "guid": "1f85676c-b0a5-45b3-b528-8420e5cae066", "status": "ACTIVE", "createdBy": "admin", "updatedBy": "admin", "createTime": 1506624242409, "updateTime": 1506624364249, "version": 0, "relationshipAttributes": { "tables": [], "sourceToProcesses": [], "sinkFromProcesses": [], "customer": { "guid": "bec94ddc-dec3-42cb-b1c3-b19dff655693", "typeName": "Customer", "displayText": "cust1", "relationshipGuid": "ad2bb1bb-9da1-4fc5-9ca6-25d09b583541", "relationshipAttributes": { "typeName": "CustomerOwnership" } } }, "classifications": [] } }, "entity": { "typeName": "Customer", "attributes": { "owner": null, "systems": [ { "guid": "1f85676c-b0a5-45b3-b528-8420e5cae066", "typeName": "SorSystem" } ], "qualifiedName": "cust1", "name": "cust1", "description": null }, "guid": "bec94ddc-dec3-42cb-b1c3-b19dff655693", "status": "ACTIVE", "createdBy": "admin", "updatedBy": "admin", "createTime": 1506624164918, "updateTime": 1506624332364, "version": 0, "relationshipAttributes": { "systems": { "guid": "1f85676c-b0a5-45b3-b528-8420e5cae066", "typeName": "SorSystem", "displayText": "sor", "relationshipGuid": "e63c1d2b-08c4-483a-a345-c2d6d8cb7bb7", "relationshipAttributes": { "typeName": "CustomerOwnership" } } }, "classifications": [] } } {code} I would assume that this is due to the UI using the V1 API rather than making a call to the V2 Relationship API. That being said, my assumption was that if I set the legacy flag on the RelationshipDef the attributes that correspond to the field names in each end would be set correctly when the relationship instance was created. Tracing through the code during a create relationship call via the REST api, I see nothing that honors the legacy flag. (unless it is happening under the covers in the titan code.) was (Author: ppadovani): Update: If I set the property 'atlas.ui.editable.entity.types=*' to allow for custom types to be created from the UI, and create two entities (one on each side of the CustomerOwned defined relationship type) I can properly define the relationship on each side, and the data is set correctly. ```{ "referredEntities": { "1f85676c-b0a5-45b3-b528-8420e5cae066": { "typeName": "SorSystem", "attributes": { "owner": null, "tables": null, "qualifiedName": "sor@cust1", "name": "sor", "description": null, "customer": { "guid": "bec94ddc-dec3-42cb-b1c3-b19dff655693", "typeName": "Customer" } }, "guid": "1f85676c-b0a5-45b3-b528-8420e5cae066", "status": "ACTIVE", "createdBy": "admin", "updatedBy": "admin", "createTime": 1506624242409, "updateTime": 1506624364249, "version": 0, "relationshipAttributes": { "tables": [], "sourceToProcesses": [], "sinkFromProcesses": [], "customer": { "guid": "bec94ddc-dec3-42cb-b1c3-b19dff655693", "typeName": "Customer",
[jira] [Comment Edited] (ATLAS-2178) Type Inheritance in conjunction with RelationshipDef fails to set legacy attributes
[ https://issues.apache.org/jira/browse/ATLAS-2178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16182661#comment-16182661 ] Pierre Padovani edited comment on ATLAS-2178 at 9/27/17 3:36 PM: - I've attached json files that can reproduce the issues I'm seeing. types.json is the type system, while entities.json are the new entities created. Each of the rel#.json files contains the payload to create a relationship. The guids in the rel#.json files have to be updated to match the created entities prior to submission. Results seen from these files: SorTable instance does not know about linked column, column doesn't know about table. SorExtraction (Process) only has outputs set, but no inputs. Many other inconsistencies in how relationships were set including the legacy attributes not being set correctly. was (Author: ppadovani): types.json is the type system, while entities.json are the new entities created. Each of the rel#.json files contains the payload to create a relationship. The guids in the relationship#.json files have to be updated to match the created entities prior to submission. Results seen from these files: SorTable instance does not know about linked column, column doesn't know about table. SorExtraction (Process) only has outputs set, but no inputs. Many other inconsistencies in how relationships were set including the legacy attributes not being set correctly. > Type Inheritance in conjunction with RelationshipDef fails to set legacy > attributes > --- > > Key: ATLAS-2178 > URL: https://issues.apache.org/jira/browse/ATLAS-2178 > Project: Atlas > Issue Type: Bug > Components: atlas-core >Affects Versions: 1.0.0 >Reporter: Pierre Padovani > Attachments: entities.json, rel1.json, rel2.json, rel3.json, > rel4.json, rel5.json, types.json > > > If a type inherits from another that has an old style reference attribute, > and a new style RelationshipDef defined, creating the relationship instance > fails to set the legacy attributes and in some cases fails to create the > relationship itself. > Steps to reproduce: > * create a type, say my_table, that inherits from the hive_table > * Create an instance of the new type my_table > * Create an instance of a hive_column > * Create the containment relationship between the two models. > This behavior causes odd and inconsistent behavior and fully breaks lineage > reports for process types that inherit from the built in Process. -- This message was sent by Atlassian JIRA (v6.4.14#64029)