Skip to content

Commit ad3af78

Browse files
committed
changes in delete data topic
1 parent 6da0725 commit ad3af78

File tree

1 file changed

+31
-13
lines changed

1 file changed

+31
-13
lines changed

articles/data-explorer/delete-data.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,54 @@
11
---
22
title: Delete data from Azure Data Explorer
3-
description: This article describes bulk delete scenarios in Azure Data Explore, including purge and retention based deletes.
3+
description: This article describes delete scenarios in Azure Data Explorer, including purge, dropping extents and retention based deletes.
44
author: orspod
55
ms.author: orspodek
6-
ms.reviewer: mblythe
6+
ms.reviewer: avneraa
77
ms.service: data-explorer
88
ms.topic: conceptual
9-
ms.date: 09/24/2018
9+
ms.date: 03/12/2020
1010
---
1111

1212
# Delete data from Azure Data Explorer
1313

14-
Azure Data Explorer supports several bulk delete approaches, which we cover in this article. It doesn't support per-record deletion in real time, because it's optimized for fast read access.
14+
Azure Data Explorer supports various delete scenarios described in this article.
1515

16-
* If one or more tables is no longer needed, delete them using the drop table or drop tables command.
16+
## Delete using retention policy
17+
18+
Azure Data Explorer automatically deletes data based on the [retention policy](/azure/kusto/management/retentionpolicy). This is the most efficient and hassle-free method of deleting data. Set the retention policy at the database or table level.
19+
20+
Consider a database or table that is set for 90 days of retention. If only 60 days of data are needed, delete the older data as follows:
1721

1822
```Kusto
19-
.drop table <TableName>
23+
.alter-merge database <DatabaseName> policy retention softdelete = 60d
2024

21-
.drop tables (<TableName1>, <TableName2>,...)
25+
.alter-merge table <TableName> policy retention softdelete = 60d
2226
```
2327

24-
* If old data is no longer needed, delete it by changing the retention period at the database or table level.
28+
## Delete data by dropping extents
29+
30+
[Extent (data shard)](/azure/kusto/management/extents-overview) is the internal structure where data is stored. Each extent can hold up to millions of records. Extents can be deleted individually or as a group using [drop extent(s) commands](/azure/kusto/management/extents-commands#drop-extents).
31+
32+
### Examples
33+
34+
You can delete all rows in a table or just a specific extent.
2535

26-
Consider a database or table that is set for 90 days of retention. Business needs change, so now only 60 days of data is needed. In this case, delete the older data in one of the following ways.
36+
* Delete all rows in a table:
2737

2838
```Kusto
29-
.alter-merge database <DatabaseName> policy retention softdelete = 60d
39+
.drop extents from TestTable
40+
```
3041
31-
.alter-merge table <TableName> policy retention softdelete = 60d
42+
* Delete a specific extent:
43+
44+
```Kusto
45+
.drop extent e9fac0d2-b6d5-4ce3-bdb4-dea052d13b42
3246
```
3347
34-
For more information, see [Retention policy](https://docs.microsoft.com/azure/kusto/concepts/retentionpolicy).
48+
## Delete individual rows using purge
49+
50+
> [!NOTE]
51+
> Purge allows you to delete personal data from the device or service and can be used to support your obligations under the GDPR. If you're looking for general information about GDPR, see the [GDPR section of the Service Trust portal](https://servicetrust.microsoft.com/ViewPage/GDPRGetStarted).
52+
53+
[Data purge](/azure/kusto/management/data-purge) can be used for deleting individuals rows. Deletion is *not* immediate and requires significant system resources. Therefore, it is only advised for compliance scenarios.
3554
36-
If you need assistance with data deletion issues, please open a support request in the [Azure portal](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview).

0 commit comments

Comments
 (0)