Hi all, is it possible to add column lineage via t...
# advice-metadata-modeling
s
Hi all, is it possible to add column lineage via the graphql api? If so, how would i have to change my query? I have successfully added lineage between two datasets, but when I switch to using the schemafield urns i get an error.
Copy code
mutation ($downstream_urn: String!, $upstream_urn: String!,){
                updateLineage(
                    input: {
                        edgesToAdd: [{
                            downstreamUrn: $downstream_urn
                            upstreamUrn: $upstream_urn
                        }]
                        edgesToRemove: []
                    }
                )
            }
Variables for dataset (working):
Copy code
{
  "downstream_urn": "urn:li:dataset:(urn:li:dataPlatform:postgres,postgres.public.device,PROD)",
  "upstream_urn": "urn:li:dataset:(urn:li:dataPlatform:mssql,DB.db_table.asset,PROD)"
}
Variables for schemafield (not working):
Copy code
{
  "downstream_urn": "urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:postgres,postgres.public.device,PROD),device_id)",
  "upstream_urn": "urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:mssql,DB.db_table.asset,PROD),serial_number)"
}
Response I am getting:
Copy code
{
  "errors": [
    {
      "message": "Cannot upsert lineage as downstream urn urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:postgres,postgres.public.device,PROD),device_id) doesn't exist",
      "locations": [
        {
          "line": 3,
          "column": 17
        }
      ],
      "path": [
        "updateLineage"
      ],
      "extensions": {
        "code": 400,
        "type": "BAD_REQUEST",
        "classification": "DataFetchingException"
      }
    }
  ],
  "data": {
    "updateLineage": null
  },
  "extensions": {}
}
📖 1
🔍 1
1
l
Hey there 👋 I'm The DataHub Community Support bot. I'm here to help make sure the community can best support you with your request. Let's double check a few things first: ✅ There's a lot of good information on our docs site: www.datahubproject.io/docs, Have you searched there for a solution? ✅ button ✅ It's not uncommon that someone has run into your exact problem before in the community. Have you searched Slack for similar issues? ✅ button Did you find a solution to your issue? ❌ Sorry you weren't able to find a solution. I'm sending you some tips on info you can provide to help the community troubleshoot. Whenever you feel your issue is solved, please react ✅ to your original message to let us know!
d
Hey @straight-hairdresser-4506, unfortunately adding column-level lineage via GraphQL is currently not supported. 😞 You can check this docs on which APIs support which features: https://datahubproject.io/docs/api/datahub-apis#datahub-api-comparison