atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Padovani (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ATLAS-2178) Sending RelationshipAttributes with entity update using legacy refs fails to create edge
Date Mon, 02 Oct 2017 18:49:00 GMT

     [ https://issues.apache.org/jira/browse/ATLAS-2178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pierre Padovani updated ATLAS-2178:
-----------------------------------
    Description: 
*UPDATE*
I tracked down specifically what causes this and have updated the title and this description
to reflect that. I've left the old description as reference.

When using the AtlasClientV2 while performing complex add/modify operations, if you do not
NULL out the relationship attributes on an update, any references that you may have added
will not be set. Using the relationship REST API also fails to set the legacy attributes on
relationships, and fails to set them at all in some cases.

This works:
{code:java}
{
    "referredEntities": {},
    "entity": {
        "typeName": "Customer",
        "attributes": {
            "owner": null,
            "extractProcesses": null,
            "systems": [{"guid":"cd80c575-f092-4ea7-ad43-3ee0e4bbefd3", "typeName":"SorSystem"}],
            "qualifiedName": "clueacademy@dev-app-1",
            "name": "clueAcademy",
            "description": "Cluemasters Academy",
            "collectedDataSets": null
        },
        "guid": "efb17484-15d7-4001-a0e5-e135d96eca9e",
        "status": "ACTIVE",
        "createdBy": "admin",
        "updatedBy": "admin",
        "createTime": 1506961203462,
        "updateTime": 1506961207280,
        "version": 0
    }
}
{code}

This doesn't work:
{code:java}
{
    "referredEntities": {},
    "entity": {
        "typeName": "Customer",
        "attributes": {
            "owner": null,
            "extractProcesses": null,
            "systems": [{"guid":"cd80c575-f092-4ea7-ad43-3ee0e4bbefd3", "typeName":"SorSystem"}],
            "qualifiedName": "clueacademy@dev-app-1",
            "name": "clueAcademy",
            "description": "Cluemasters Academy",
            "collectedDataSets": null
        },
        "guid": "efb17484-15d7-4001-a0e5-e135d96eca9e",
        "status": "ACTIVE",
        "createdBy": "admin",
        "updatedBy": "admin",
        "createTime": 1506961203462,
        "updateTime": 1506961207280,
        "version": 0,
        "relationshipAttributes": {
            "extractProcesses": null,
            "systems": null,
            "collectedDataSets": null
        },
        "classifications": []
    }
}
{code}

*Below is no longer valid*
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.

  was:
*UPDATE*
I tracked down specifically what causes this and have updated the title and this description
to reflect that. I've left the old description as reference.

When using the AtlasClientV2 while performing complex add/modify operations, if you do not
NULL out the relationship attributes on an update, any references that you may have added
will not be set. Using the relationship REST API also fails to set the legacy attributes on
relationships, and fails to set them at all in some cases.

This works:
{code:java}
{
    "referredEntities": {},
    "entity": {
        "typeName": "Customer",
        "attributes": {
            "owner": null,
            "extractProcesses": null,
            "systems": [{"guid":"cd80c575-f092-4ea7-ad43-3ee0e4bbefd3", "typeName":"SorSystem"}],
            "qualifiedName": "clueacademy@dev-app-1",
            "name": "clueAcademy",
            "description": "Cluemasters Academy",
            "collectedDataSets": null
        },
        "guid": "efb17484-15d7-4001-a0e5-e135d96eca9e"
    }
}
{code}

This doesn't work:
{code:java}
{
    "referredEntities": {},
    "entity": {
        "typeName": "Customer",
        "attributes": {
            "owner": null,
            "extractProcesses": null,
            "systems": [{"guid":"cd80c575-f092-4ea7-ad43-3ee0e4bbefd3", "typeName":"SorSystem"}],
            "qualifiedName": "clueacademy@dev-app-1",
            "name": "clueAcademy",
            "description": "Cluemasters Academy",
            "collectedDataSets": null
        },
        "guid": "efb17484-15d7-4001-a0e5-e135d96eca9e",
        "status": "ACTIVE",
        "createdBy": "admin",
        "updatedBy": "admin",
        "createTime": 1506961203462,
        "updateTime": 1506961207280,
        "version": 0,
        "relationshipAttributes": {
            "extractProcesses": null,
            "systems": null,
            "collectedDataSets": null
        },
        "classifications": []
    }
}
{code}

*Below is no longer valid*
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.


> Sending RelationshipAttributes with entity update using legacy refs fails to create edge
> ----------------------------------------------------------------------------------------
>
>                 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
>
>
> *UPDATE*
> I tracked down specifically what causes this and have updated the title and this description
to reflect that. I've left the old description as reference.
> When using the AtlasClientV2 while performing complex add/modify operations, if you do
not NULL out the relationship attributes on an update, any references that you may have added
will not be set. Using the relationship REST API also fails to set the legacy attributes on
relationships, and fails to set them at all in some cases.
> This works:
> {code:java}
> {
>     "referredEntities": {},
>     "entity": {
>         "typeName": "Customer",
>         "attributes": {
>             "owner": null,
>             "extractProcesses": null,
>             "systems": [{"guid":"cd80c575-f092-4ea7-ad43-3ee0e4bbefd3", "typeName":"SorSystem"}],
>             "qualifiedName": "clueacademy@dev-app-1",
>             "name": "clueAcademy",
>             "description": "Cluemasters Academy",
>             "collectedDataSets": null
>         },
>         "guid": "efb17484-15d7-4001-a0e5-e135d96eca9e",
>         "status": "ACTIVE",
>         "createdBy": "admin",
>         "updatedBy": "admin",
>         "createTime": 1506961203462,
>         "updateTime": 1506961207280,
>         "version": 0
>     }
> }
> {code}
> This doesn't work:
> {code:java}
> {
>     "referredEntities": {},
>     "entity": {
>         "typeName": "Customer",
>         "attributes": {
>             "owner": null,
>             "extractProcesses": null,
>             "systems": [{"guid":"cd80c575-f092-4ea7-ad43-3ee0e4bbefd3", "typeName":"SorSystem"}],
>             "qualifiedName": "clueacademy@dev-app-1",
>             "name": "clueAcademy",
>             "description": "Cluemasters Academy",
>             "collectedDataSets": null
>         },
>         "guid": "efb17484-15d7-4001-a0e5-e135d96eca9e",
>         "status": "ACTIVE",
>         "createdBy": "admin",
>         "updatedBy": "admin",
>         "createTime": 1506961203462,
>         "updateTime": 1506961207280,
>         "version": 0,
>         "relationshipAttributes": {
>             "extractProcesses": null,
>             "systems": null,
>             "collectedDataSets": null
>         },
>         "classifications": []
>     }
> }
> {code}
> *Below is no longer valid*
> 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)

Mime
View raw message