AppsAutessaDB

Data lake and analytics · AutessaDB

Retention and archive tiers

AutessaDB data lake tables have retention policies and a long-term archive tier. Retention deletes rows older than a set number of days every day; the archive tier keeps recent days queryable in the table and moves older days to compressed Parquet in an archive, where they can be restored as a read-only table when you need them again.

Goes beyond a typical managed database
app_events · lifecyclehotDays 90 · archiveDays 2555SAMPLE
hot · 90darchive · Parquet · to 7y
archiveLock COMPLIANCE
archived daysstatusrestore
2025-01-01 … 01-31RESTOREDapp_events__restored
2024-06-01 … 06-30ARCHIVED—

-- the problem

Logs you must keep for years should not cost like data you query daily

Retention policies often mean "keep it for seven years, but nobody reads it after ninety days". Keeping everything hot is wasteful, and deleting it breaks the policy. Lifecycle settings handle both: recent data stays fast, older data stays kept.

What you get

  • Retention: rows whose retention column (default _loaded_at) is older than retentionDays are deleted daily by a system job.
  • Choose a partitioned date column for retention so whole partitions drop.
  • Lifecycle: hotDays stay queryable; each older day is exported as compressed Parquet, verified and removed from the table.
  • archiveDays sets total retention including the archive.
  • Archive lock: NONE, GOVERNANCE or COMPLIANCE write-locks archived days until they expire.
  • archive segments lists archived days with rows, size, storage class and status.
  • archive restore makes a range of days (up to 366) queryable as <sqlName>__restored for 7 to 30 days, with the same access rules.
  • delete-archived removes archived data without a lock, by day and optionally one column equality.

-- how it works

How does retention and archive tiers work in AutessaDB?

  1. Choose a policy

    Plain retention (delete after N days) or a lifecycle (hot days plus archive days).

  2. Set it

    Use set-retention or set-lifecycle; the response explains in plain language what will happen.

  3. Restore when asked

    Restore a date range and query the restored table, which drops itself when its time is up.

-- every option

Lifecycle options

optionwhat it does
retentionDaysDays to keep rows; null or 0 keeps them forever.
retentionColumnDATE or TIMESTAMP column age is measured on (default _loaded_at).
hotDaysDays kept queryable in the table; null turns the archive off.
archiveDaysTotal retention in days, greater than hotDays.
archiveLockNONE, GOVERNANCE or COMPLIANCE.
RestoreFrom and to days, kept 7 days by default and at most 30; deep-archive days can take up to 12 hours.

-- example

Keep 90 days hot and 7 years in totalbash
autessa autessadb analytics set-lifecycle --tableId V1StGXR8Z5 \
  --hotDays 90 --archiveDays 2555 --retentionColumn event_date

autessa autessadb analytics archive restore --tableId V1StGXR8Z5 \
  --from 2025-01-01 --to 2025-01-31 --days 7

Full reference in the AutessaDB CLI docs and the API reference.

-- permissions

Who can do what?

accesscan
ADMINSet retention and lifecycle, restore and delete archived data.

-- relations

How it connects

-- faq

Questions about retention and archive tiers

Can I keep data lake data for years without keeping it all queryable?

Yes. Set hotDays for the queryable window and archiveDays for total retention; older days move to compressed Parquet in the archive.

Can archived data be queried again?

Yes. Restore a range of days and it becomes a read-only table named after the original with __restored, for 7 to 30 days.

Can archived days be locked against deletion?

Yes. A GOVERNANCE or COMPLIANCE archive lock write-locks archived days until they expire.

$ autessa autessadb tables create

Try retention and archive tiers in AutessaDB

Retention deletes rows past a set age; the archive tier moves older days to compressed Parquet and restores them as a read-only table when you need them.

Read the AutessaDB guide or install the CLI.

100% customizable, code and all

Make AutessaDB fully your own.

Use it out of the box, then change anything. Ask Autobot, Autessa’s AI builder, for a new field, screen, report, workflow or agent and it builds it into your copy of the app. Or open the code and edit it yourself. Nothing is locked: the app, its data and its code are yours.

Start free and make it yours