0

Is it possible to specify a UTC time when deleting data in a table in Azure Data Explorer?

For example:

My Table is constantly being ingested with an Event Hub. I want my Table retention policy to only keep data from 00:15:00 UTC to 00:15:00 UTC of next day.

I tried this, but I'm not sure about it.

.alter table TableName policy retention 
```
 {
     "SoftDeletePeriod": "1.00:15:00",
     "Recoverability": "Enabled"
 }
```

I didn't find anything related to time in the Microsoft ADX documentation.

Alejandro Alvarez
  • 131
  • 1
  • 3
  • 9

1 Answers1

1

data retention is based on a timespan value (e.g. 1.00:00:00 for 1 day) and not a datetime value (e.g. 2023-06-22 17:53:55).

  • Even then, as mentioned in the documentation: The deletion time is imprecise. The system guarantees that data won't be deleted before the limit is exceeded, but deletion isn't immediate following that point.

if you wish to delete data at a certain time, you can do so explicitly using the appropriate control commands (manually, or using a simple script/application). see: Delete data from Azure Data Explorer

alternatively, you could set a row-level-security policy on the table, that will filter out any records that you don't want to be returned to anyone querying that table, while having the retention policy eventually dropping the data.

Yoni L.
  • 22,627
  • 2
  • 29
  • 48