mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 09:58:14 +00:00
feat(api): add description parameter to editable dataset change entity event (#10237)
This commit is contained in:
parent
278a39d3df
commit
1625de8e8d
@ -346,6 +346,70 @@ This event is emitted when an existing owner has been removed from an entity on
|
||||
}
|
||||
```
|
||||
|
||||
### Add Description Event
|
||||
|
||||
This event is emitted when a description has been added to an entity on DataHub.
|
||||
|
||||
#### Header
|
||||
|
||||
<table><thead><tr><th>Category</th><th>Operation</th><th>Entity Types</th><th data-hidden></th></tr></thead><tbody><tr><td>DOCUMENTATION</td><td>ADD</td><td><code>dataset</code>, <code>dashboard</code>, <code>chart</code>, <code>dataJob</code>, <code>dataFlow</code> , <code>container</code>, <code>glossaryTerm</code>, <code>domain</code>, <code>tag</code></td><td></td></tr></tbody></table>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description | Optional |
|
||||
|-------------| ------ |--------------------------------------------------------------------------------------------------------------| -------- |
|
||||
| description | String | The description that has been added. | False |
|
||||
|
||||
#### Sample Event
|
||||
|
||||
```
|
||||
{
|
||||
"entityUrn": "urn:li:dataset:abc",
|
||||
"entityType": "dataset",
|
||||
"category": "DOCUMENTATION",
|
||||
"operation": "ADD",
|
||||
"parameters": {
|
||||
"description": "This is a new description"
|
||||
},
|
||||
"auditStamp": {
|
||||
"actor": "urn:li:corpuser:jdoe",
|
||||
"time": 1706646452982
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Remove Description Event
|
||||
|
||||
This event is emitted when an existing description has been removed from an entity on DataHub.
|
||||
|
||||
#### Header
|
||||
|
||||
<table><thead><tr><th>Category</th><th>Operation</th><th>Entity Types</th><th data-hidden></th></tr></thead><tbody><tr><td>DOCUMENTATION</td><td>REMOVE</td><td><code>dataset</code>, <code>dashboard</code>, <code>chart</code>, <code>dataJob</code>, <code>container</code> ,<code>dataFlow</code> , <code>glossaryTerm</code>, <code>domain</code>, <code>tag</code></td><td></td></tr></tbody></table>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description | Optional |
|
||||
|-------------| ------ |----------------------------------------| -------- |
|
||||
| description | String | The description that has been removed. | False |
|
||||
|
||||
#### Sample Event
|
||||
|
||||
```
|
||||
{
|
||||
"entityUrn": "urn:li:dataset:abc",
|
||||
"entityType": "dataset",
|
||||
"category": "DOCUMENTATION",
|
||||
"operation": "REMOVE",
|
||||
"parameters": {
|
||||
"description": "This is the removed description"
|
||||
},
|
||||
"auditStamp": {
|
||||
"actor": "urn:li:corpuser:jdoe",
|
||||
"time": 1706646452982
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Modify Deprecation Event
|
||||
|
||||
This event is emitted when the deprecation status of an entity has been modified on DataHub.
|
||||
|
||||
@ -5,6 +5,7 @@ import static com.linkedin.metadata.timeline.eventgenerator.EditableDatasetPrope
|
||||
|
||||
import com.datahub.util.RecordUtils;
|
||||
import com.github.fge.jsonpatch.JsonPatch;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.linkedin.common.AuditStamp;
|
||||
import com.linkedin.common.urn.Urn;
|
||||
import com.linkedin.dataset.DatasetProperties;
|
||||
@ -42,6 +43,7 @@ public class DatasetPropertiesChangeEventGenerator
|
||||
.operation(ChangeOperation.ADD)
|
||||
.semVerChange(SemanticChangeType.MINOR)
|
||||
.description(String.format(DESCRIPTION_ADDED, entityUrn, targetDescription))
|
||||
.parameters(ImmutableMap.of("description", targetDescription))
|
||||
.auditStamp(auditStamp)
|
||||
.build());
|
||||
} else if (baseDescription != null && targetDescription == null) {
|
||||
@ -53,6 +55,7 @@ public class DatasetPropertiesChangeEventGenerator
|
||||
.operation(ChangeOperation.REMOVE)
|
||||
.semVerChange(SemanticChangeType.MINOR)
|
||||
.description(String.format(DESCRIPTION_REMOVED, entityUrn, baseDescription))
|
||||
.parameters(ImmutableMap.of("description", baseDescription))
|
||||
.auditStamp(auditStamp)
|
||||
.build());
|
||||
} else if (baseDescription != null
|
||||
@ -67,6 +70,7 @@ public class DatasetPropertiesChangeEventGenerator
|
||||
.semVerChange(SemanticChangeType.MINOR)
|
||||
.description(
|
||||
String.format(DESCRIPTION_CHANGED, entityUrn, baseDescription, targetDescription))
|
||||
.parameters(ImmutableMap.of("description", targetDescription))
|
||||
.auditStamp(auditStamp)
|
||||
.build());
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import static com.linkedin.metadata.Constants.*;
|
||||
|
||||
import com.datahub.util.RecordUtils;
|
||||
import com.github.fge.jsonpatch.JsonPatch;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.linkedin.common.AuditStamp;
|
||||
import com.linkedin.common.urn.Urn;
|
||||
import com.linkedin.dataset.EditableDatasetProperties;
|
||||
@ -57,6 +58,7 @@ public class EditableDatasetPropertiesChangeEventGenerator
|
||||
.operation(ChangeOperation.ADD)
|
||||
.semVerChange(SemanticChangeType.MINOR)
|
||||
.description(String.format(DESCRIPTION_ADDED, entityUrn, targetDescription))
|
||||
.parameters(ImmutableMap.of("description", targetDescription))
|
||||
.auditStamp(auditStamp)
|
||||
.build();
|
||||
} else if (baseDescription != null && targetDescription == null) {
|
||||
@ -67,6 +69,7 @@ public class EditableDatasetPropertiesChangeEventGenerator
|
||||
.operation(ChangeOperation.REMOVE)
|
||||
.semVerChange(SemanticChangeType.MINOR)
|
||||
.description(String.format(DESCRIPTION_REMOVED, entityUrn, baseDescription))
|
||||
.parameters(ImmutableMap.of("description", baseDescription))
|
||||
.auditStamp(auditStamp)
|
||||
.build();
|
||||
} else if (baseDescription != null
|
||||
@ -80,6 +83,7 @@ public class EditableDatasetPropertiesChangeEventGenerator
|
||||
.semVerChange(SemanticChangeType.MINOR)
|
||||
.description(
|
||||
String.format(DESCRIPTION_CHANGED, entityUrn, baseDescription, targetDescription))
|
||||
.parameters(ImmutableMap.of("description", targetDescription))
|
||||
.auditStamp(auditStamp)
|
||||
.build();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user