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

ASF subversion and git services commented on ATLAS-5198:
--------------------------------------------------------

Commit 06ae728cf0e38eed3cd0701f037012562b81984f in atlas's branch 
refs/heads/atlas-2.5 from Aditya Gupta
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=06ae728cf ]

ATLAS-5198: Review and Improve logging of create/update entity flow (#512)

(cherry picked from commit f00d3733ae558a3add3cadf8aafa2ccd7a9feb8c)


> Review and Improve logging of create/update entity flow
> -------------------------------------------------------
>
>                 Key: ATLAS-5198
>                 URL: https://issues.apache.org/jira/browse/ATLAS-5198
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: Aditya Gupta
>            Assignee: Aditya Gupta
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> *What Changes done?*
> *Improved error messaging [AtlasErrorCode] for invalid relationship end 
> types.*
> {*}Added and Improved debug logging in entity create/update flows{*}{*}{{*}}
> *Validating relationships logs added for invalid relationship, aren’t helpful*
> *Steps:*
> *//create a custom type-def*
> curl -X POST "http://localhost:21000/api/atlas/v2/types/typedefs"; \
>   -H "Content-Type: application/json" \
>   -H "Accept: application/json" \
>   -H "X-XSRF-HEADER: wXcHEM9FcgWQCjJTNDBD" \
>   -b "ATLASSESSIONID=node0e8vpukcvr0fg2ak8gb1f0hlk0.node0" \
>   -d '{
>     "entityDefs": [
>      
> {         "name": "hive_table_demo3",         "description": "Custom hive 
> table entity type for testing relationship",         "superTypes": [          
>  "DataSet"         ],         "attributeDefs": []       }
>     ]
>   }'
>  
> *//create a custom relationshipDef*
> curl -X POST 'http://localhost:21000/api/atlas/v2/types/typedefs' \
>   -H 'Content-Type: application/json' \
>   -H 'Accept: application/json' \
>   -H 'X-XSRF-HEADER: wXcHEM9FcgWQCjJTNDBD' \
>   -b 'ATLASSESSIONID=node0e8vpukcvr0fg2ak8gb1f0hlk0.node0' \
>   -d '{
>     "enumDefs": [],
>     "structDefs": [],
>     "classificationDefs": [],
>     "entityDefs": [],
>     "relationshipDefs": [
>       {
>         "name": "table_to_table_lineage7",
>         "description": "Custom lineage relationship between hive tables",
>         "relationshipCategory": "ASSOCIATION",
>         "propagateTags": "NONE",
>         "endDef1":
> {           "type": "hive_table",           "name": "sourceTables",           
> "cardinality": "SET",           "isContainer": false,           
> "isLegacyAttribute": false         }
> ,
>         "endDef2":
> {           "type": "hive_table_demo3",           "name": "targetTables",     
>       "cardinality": "SET",           "isContainer": false,           
> "isLegacyAttribute": false         }
>       }
>     ]
>   }'
>  
> *//Already created 2* *impala_process and hbase_table* *entities:* 
> [ffe73ace-29b2-4a3d-acec-fab017797acb, 3fa0fa70-7713-4ad9-8265-548d940e0533]
> *//Create relationship betwwen 2 impala_process and hbase_table entites*
>     curl -X POST 'http://localhost:21000/api/atlas/v2/relationship' \
>   -H 'Content-Type: application/json' \
>   -H 'Accept: application/json' \
>   -H 'X-XSRF-HEADER: wXcHEM9FcgWQCjJTNDBD' \
>   -b 'ATLASSESSIONID=node0e8vpukcvr0fg2ak8gb1f0hlk0.node0' \
>   -d '{
>     "typeName": "table_to_table_lineage7",
>     "end1":
> {       "guid": "ffe73ace-29b2-4a3d-acec-fab017797acb" //impala_process GUID  
>    }
> ,
>     "end2":
> {       "guid": "3fa0fa70-7713-4ad9-8265-548d940e0533" //hbase_table GUID     
> }
>   }'
>  
> *//Getting Error:*
> {"errorCode":"ATLAS-400-00-036","errorMessage":"invalid relationshipDef: 
> table_to_table_lineage7: actual: [end type 1: impala_process, end type 2: 
> hbase_table]. expected: [end type 1: hive_table, end type 2: 
> hive_table_demo3]"}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to