Creating a custom ownership type with CLI ingestion and resolving errors in the example code

Original Slack Thread

I’m trying to create a custom ownership type using the CLI ingestion exactly as shown in the <https://datahubproject.io/docs/ownership/ownership-types|documentation example here>, but am getting an odd error for it. After debugging for a while without any progress, I wonder if the example is correct, since it doesn’t include any info that other File -ingestion examples have like “entityType”

Here’s the error from the ingestion results
'failures': {'path-0': ['com.linkedin.pegasus2avro.usage.UsageAggregation is missing required field: bucket']},

and the ownership type json

  "urn": "urn:li:ownershipType:architect",
  "info": {
    "name": "Architect",
    "description": "Technical person responsible for the asset"
  }
}```
Which compared to the other file-ingestion json examples is quite different
eg. <https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/examples/mce_files/test_domains.json>

<@U01L2QD243Z> Could you look into this?

Hello,

What version of the cli and server are you using?

For CLI we tried with acryl-datahub, version 0.10.5.5 and 0.10.3.1 for server <@U02M2G7CXFX> I guess we are on v0.10.5

0.10.3.1 ? That docker image does not exist, see https://hub.docker.com/r/linkedin/datahub-gms/tags?page=1&amp;name=0.10.3

How did you deploy DataHub? K8s or Docker compose?

You need to upgrade to v0.10.4, the documentation seems to have been tagged incorrectly. See the release notes here: https://github.com/datahub-project/datahub/releases/tag/v0.10.4

The example was indeed wrong. Thank you for catching that.
The json payload should be:

  {
    "auditHeader":null,
    "entityType":"ownershipType",
    "entityUrn": "urn:li:ownershipType:architect",
    "changeType":"UPSERT",
    "aspectName":"ownershipTypeInfo",
    "aspect":{
      "value":"{\"name\": \"Architect\", \"description\": \"Technical person responsible for the asset\", \"created\": {\"time\": 1674291843000,  \"actor\": \"urn:li:corpuser:jdoe\",  \"impersonator\": null},\n\"lastModified\": {\"time\": 1674291843000,  \"actor\": \"urn:li:corpuser:jdoe\",  \"impersonator\": null}}",
      "contentType":"application/json"
    },
    "systemMetadata":null
  }
]```
I have created a PR to fix this: <https://github.com/datahub-project/datahub/pull/8847/files>

Thanks above payload format works fine