diff --git a/docs/interacting/data-lifecycle.md b/docs/interacting/data-lifecycle.md new file mode 100644 index 000000000..6163b7329 --- /dev/null +++ b/docs/interacting/data-lifecycle.md @@ -0,0 +1,102 @@ +# Data Lifecycle + +## [Measures](../concept/data-model.md#measures) and [Streams](../concept/data-model.md#streams) + +Due to the design of BanyanDB, the data in the `Measures and Streams` can not be deleted directly. +The data will be deleted automatically based on the [Groups](../concept/data-model.md#groups) `TTL` setting. + +The TTL means the `time to live` of the data in the group. +Each group has an internal trigger which is triggered by writing events. If there is no further data, the expired data can’t get removed. + +For example, the following command will create a group with a TTL of 7 days: +```shell +bydbctl group create -f - <