You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/how/delete-metadata.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,28 @@ This physically deletes all rows for all aspects of the entity. This action cann
33
33
datahub delete --urn "<my urn>" --hard
34
34
```
35
35
36
-
As of datahub v.0.8.35 doing a hard delete by urn will also provide you with a way to remove references to the urn being deleted across the metadata graph. This is important to use if you don't want to have ghost references in your metadata model and want to save space in the graph database.
36
+
As of datahub v0.8.35 doing a hard delete by urn will also provide you with a way to remove references to the urn being deleted across the metadata graph. This is important to use if you don't want to have ghost references in your metadata model and want to save space in the graph database.
37
37
For now, this behaviour must be opted into by a prompt that will appear for you to manually accept or deny.
38
38
39
+
Starting v0.8.44.2, this also supports deletion of a specific `timeseries` aspect associated with the entity, optionally for a specific time range.
40
+
41
+
_Note: Deletion by a specific aspect and time range is currently supported only for timeseries aspects._
42
+
43
+
```bash
44
+
# Delete all of the aspect values for a given entity and a timeseries aspect.
45
+
datahub delete --urn "<entity urn>" -a "<timeseries aspect>" --hard
46
+
Eg: datahub delete --urn "urn:li:dataset:(urn:li:dataPlatform:snowflake,test_dataset,TEST)" -a "datasetProfile" --hard
47
+
48
+
# Delete all of the aspect values for a given platform and a timeseries aspect.
49
+
datahub delete -p "<platform>" -a "<timeseries aspect>" --hard
50
+
Eg: datahub delete -p "snowflake" -a "datasetProfile" --hard
51
+
52
+
# Delete the aspect values for a given platform and a timeseries aspect corresponding to a specific time range.
f"Took {(deletion_result.end_time_millis-deletion_result.start_time_millis)/1000.0} seconds to {message}{deletion_result.num_records} rows for {deletion_result.num_entities} entities"
250
+
f"Took {(deletion_result.end_time-deletion_result.start_time)/1000.0} seconds to {message}"
251
+
f" {deletion_result.num_records} versioned rows"
252
+
f" and {deletion_result.num_timeseries_records} timeseries aspect rows"
253
+
f" for {deletion_result.num_entities} entities."
205
254
)
206
255
else:
207
256
click.echo(
208
-
f"{deletion_result.num_entities} entities with {deletion_result.num_recordsifdeletion_result.num_records!=UNKNOWN_NUM_RECORDSelse'unknown'} rows will be affected. Took {(deletion_result.end_time_millis-deletion_result.start_time_millis)/1000.0} seconds to evaluate."
257
+
f"{deletion_result.num_entities} entities with {deletion_result.num_recordsifdeletion_result.num_records!=UNKNOWN_NUM_RECORDSelse'unknown'} rows will be affected. Took {(deletion_result.end_time-deletion_result.start_time)/1000.0} seconds to evaluate."
209
258
)
210
259
ifdeletion_result.sample_records:
211
260
click.echo(
@@ -276,7 +325,7 @@ def delete_with_filters(
276
325
click.echo(
277
326
f"No urns to delete. Maybe you want to change entity_type={entity_type} or platform={platform} to be something different?"
0 commit comments