Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2178

Sending RelationshipAttributes with entity update using legacy refs fails to create edge

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0.0
    • None
    • atlas-core
    • None

    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:

      {
          "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
          }
      }
      

      This doesn't work:

      {
          "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": []
          }
      }
      

      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.

      Attachments

        1. types.json
          25 kB
          Pierre Padovani
        2. rel1.json
          0.2 kB
          Pierre Padovani
        3. rel2.json
          0.2 kB
          Pierre Padovani
        4. rel5.json
          0.2 kB
          Pierre Padovani
        5. rel4.json
          0.2 kB
          Pierre Padovani
        6. rel3.json
          0.2 kB
          Pierre Padovani
        7. entities.json
          0.7 kB
          Pierre Padovani

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ppadovani Pierre Padovani
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: