Skip to content

Retention rules

Imported from Confluence

Content may be outdated. Verify before following any procedures. View original | Last updated: November 2022

Load segments for the last 2 years + all new segments and drop segments older then 2 years

curl --location --request POST 'https://druid.prd-aws.fyber.com/druid/coordinator/v1/rules/calzone' \
--header 'Content-Type: application/json' \
--data-raw '[{
  "type" : "loadByPeriod",
  "period" : "P2Y",
  "includeFuture" : true,
  "tieredReplicants": {
      "_default_tier" : 2
   }
  },
    {
      "type" : "dropForever"
    }]' -u admin:<admin password>

curl --location --request POST 'https://druid.prd-aws.fyber.com/druid/coordinator/v1/rules/calzone-creation-timestamp' \
--header 'Content-Type: application/json' \
--data-raw '[{
  "type" : "loadByPeriod",
  "period" : "P2Y",
  "includeFuture" : true,
  "tieredReplicants": {
      "_default_tier" : 2
   }
  },
    {
      "type" : "dropForever"
    }]' -u admin:<admin password>