Support Questions
Find answers, ask questions, and share your expertise

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

Solved Go to solution

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

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

Accepted Solutions

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

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

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

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

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

thank you very much, it works through you method!

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

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-...