Support Questions

Find answers, ask questions, and share your expertise

How can we create lineageinfo between two entities using atlas rest api v2

avatar

we need to create lineageinfo between two existed entities or new created entities, but can not find useful api, any help is aprreciated

1 ACCEPTED SOLUTION

avatar
Expert Contributor

@haosheng lou, consider creating a process entity with inputs and outputs attributes.

e.g.

POST http://localhost:21000/api/atlas/v2/entity

{
  "entity": {
    "typeName": "Process",
    "attributes": {
      "description": null,
      "name": "process1",
      "owner": null,
      "inputs": [
        {
          "guid": "cf3be027-1cbf-4109-a6b4-dabe980043a0",
          "typeName": "DataSet"
        }
      ],
      "outputs": [
        {
          "guid": "8493a6a6-51c8-4106-a3dc-89eccb00833d",
          "typeName": "DataSet"
        }
      ],
      "qualifiedName": "process1@cl1"
    },
    "guid": -1
  },
  "referredEntities": {}
}

View solution in original post

3 REPLIES 3

avatar
Expert Contributor

@haosheng lou, consider creating a process entity with inputs and outputs attributes.

e.g.

POST http://localhost:21000/api/atlas/v2/entity

{
  "entity": {
    "typeName": "Process",
    "attributes": {
      "description": null,
      "name": "process1",
      "owner": null,
      "inputs": [
        {
          "guid": "cf3be027-1cbf-4109-a6b4-dabe980043a0",
          "typeName": "DataSet"
        }
      ],
      "outputs": [
        {
          "guid": "8493a6a6-51c8-4106-a3dc-89eccb00833d",
          "typeName": "DataSet"
        }
      ],
      "qualifiedName": "process1@cl1"
    },
    "guid": -1
  },
  "referredEntities": {}
}

avatar

thank you very much, it works through you method!

avatar

I get another error when create hive_process by rest api v2 , detail info in

https://community.hortonworks.com/questions/229267/error-when-i-create-hive-process-with-rest-api-2-...