Using CrateDB with the adapter for Prometheus metric LTS. The table has been created as follows:
CREATE TABLE "metrics" (
"timestamp" TIMESTAMP,
"labels_hash" STRING,
"labels" OBJECT(DYNAMIC),
"value" DOUBLE,
"valueRaw" LONG,
"day__generated" TIMESTAMP GENERATED ALWAYS AS date_trunc('day', "timestamp"),
PRIMARY KEY ("timestamp", "labels_hash", "day__generated")
) PARTITIONED BY ("day__generated")
WITH (codec = 'best_compression');
However, duplicate primary key errors are produced. What are we missing here? Looks like they should be unique.