Vi there again.
I’m looking for something similar to retention policy from influxdb for cratedb.
Or a settings or mechanism to configure data downsampling.
If there isn’t any downsampling mechanism, is there a tool similar to curator for elasticsearch
to delete old data?
Or should I, for now, implement cron that run delete command daily to delete it?
Best regards,
Roman Kaminski
1 Like
Allrighty,
I’m running crate 3.3.2 and found out solution to partition the table, then delete old tables:
“day__generated” TIMESTAMP GENERATED ALWAYS AS date_trunc(‘day’, “timestamp”),
) PARTITIONED BY (“day__generated”);
But I see no partitions being displayed on the “overview” page.
Is this mechanism compatible with version 3 or I need to upgrade?
Roman
1 Like
Hi, partitioning by a generated column using date_trunc
was already possible in version 3, but for downsampling you would probably be looking at using date_bin
which was introduced in 4.7 so upgrading would be best if that is an option for you.
Take a look at Resampling time-series data with DATE_BIN - Tutorials - CrateDB Community
and CrateDB and Apache Airflow: Implementation of a Data Retention Policy - Tutorials - CrateDB Community.
2 Likes