Will a https://datahubproject.io/docs/advanced/mcp-mcl/|MetadataChangelogEvent tell me if a totally new dataset was created in DataHub or if an owner was added/removed?
In this case, ingestion uses the Python API to emit to DH.
Will a https://datahubproject.io/docs/advanced/mcp-mcl/|MetadataChangelogEvent tell me if a totally new dataset was created in DataHub or if an owner was added/removed?
In this case, ingestion uses the Python API to emit to DH.
Hey there! Make sure your message includes the following information if relevant, so we can help more effectively!
<@U06TM7M40RK> Can you help with the questions in this thread?
We’re experimenting with a new AI assistant for questions in the <#CUMUWQU66> channel to help you track down helpful resources more quickly. Keep in mind that responses may not always be spot-on; feel free to ask it follow-up questions and don’t forget to provide its responses a
or
so other folks in the Community know if you’re still looking for help on the topic!
To determine if a totally new dataset was created in DataHub or if an owner was added/removed, you can use the MetadataChangeLogEvent
.
New Dataset Creation:
changeType
set to CREATE
and entityType
set to dataset
.Owner Added/Removed:
MetadataChangeLogEvent
. The event will have changeType
set to UPSERT
for adding an owner and DELETE
for removing an owner. The aspectName
field will be ownership
to indicate changes related to ownership.Here is an example of how these events might look:
New Dataset Creation Event:
{
"entityUrn": "urn:li:dataset:abc",
"entityType": "dataset",
"changeType": "CREATE",
"aspectName": "datasetProperties",
"aspect": {
"value": "{\"name\": \"Sample Dataset\"}",
"contentType": "application/json"
},
"created": {
"time": 1649953100653,
"actor": "urn:li:corpuser:jdoe"
}
}
Owner Added Event:
{
"entityUrn": "urn:li:dataset:abc",
"entityType": "dataset",
"changeType": "UPSERT",
"aspectName": "ownership",
"aspect": {
"value": "{\"owners\": [{\"owner\": \"urn:li:corpuser:jdoe\", \"type\": \"DATAOWNER\"}]}",
"contentType": "application/json"
},
"created": {
"time": 1649953100653,
"actor": "urn:li:corpuser:jdoe"
}
}
Owner Removed Event:
{
"entityUrn": "urn:li:dataset:abc",
"entityType": "dataset",
"changeType": "DELETE",
"aspectName": "ownership",
"aspect": {
"value": "{\"owners\": [{\"owner\": \"urn:li:corpuser:jdoe\", \"type\": \"DATAOWNER\"}]}",
"contentType": "application/json"
},
"created": {
"time": 1649953100653,
"actor": "urn:li:corpuser:jdoe"
}
}
Would you like more detailed information on how to configure or use these events?
Sources: