--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: capped excerpt: | DuckDB Community Extensions Tables that forget: retention by age, size or row count over immutable Parquet files extension: name: capped description: "Tables that forget: retention by age, size or row count over immutable Parquet files" version: 0.1.0 language: "C++ & Rust" build: cmake license: Apache-2.0 requires_toolchains: "rust" excluded_platforms: "linux_amd64_musl;linux_arm64_musl;windows_amd64;windows_arm64;windows_amd64_mingw;wasm_mvp;wasm_eh;wasm_threads" # osx_amd64 is an opt-in entry in extension-ci-tools' distribution matrix, # so the registry only builds it when opted into here. opt_in_platforms: osx_amd64 maintainers: - hamin repo: github: hamin/duckdb-capped ref: ed5377165b4ae1903b3825538882b19eba6a00ef docs: hello_world: | INSTALL capped FROM community; LOAD capped; ATTACH 'telemetry-store' AS t (TYPE capped); CREATE TABLE t.main.events(ts TIMESTAMPTZ, severity VARCHAR, body VARCHAR) WITH (time_col = 'ts', ttl = '7 days', max_bytes = '1GB'); INSERT INTO t.main.events VALUES (now(), 'info', 'hello capped'); SELECT severity, body FROM t.main.events; extended_description: | capped gives DuckDB tables that forget. You set a limit on each table when you create it: how old rows may get (`ttl`), how big the table may grow (`max_bytes`), or how many rows it may hold (`max_rows`). New rows keep coming in, and the oldest data is removed whenever a limit is passed. It is built for telemetry such as logs, traces, metrics and events, where nobody needs last month's data and nobody wants to schedule cleanup jobs. Each table is stored as a series of immutable Parquet files. Removing old data means deleting whole files, so nothing is rewritten, no space is left behind, and size limits are exact. Queries go through DuckDB's own Parquet reader, so filters and pushdown work as usual. Retention runs when a store is attached, on every write, and on a background thread. Tables can also opt in to full-text and vector search (`capped_fts`, `capped_vector_search`), and the indexes are removed along with the data they cover. extension_star_count: 3 extension_star_count_pretty: 3 extension_download_count: null extension_download_count_pretty: n/a image: '/images/community_extensions/social_preview/preview_community_extension_capped.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.5.5 | 1.5.6 | 2.0.0 | 2.0.1 | | :--- | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ❌ | ✅ | | Linux ARM64 | ❌ | ❌ | ❌ | ✅ | | macOS AMD64 | ❌ | ❌ | ❌ | ✅ | | macOS ARM64 | ❌ | ❌ | ❌ | ✅ | | Windows AMD64 | ❌ | ❌ | ❌ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions | function_name | function_type | description | comment | examples | |----------------------|---------------|-------------|---------|----------| | capped_add_segment | table | NULL | NULL | | | capped_enforce | table | NULL | NULL | | | capped_fts | table | NULL | NULL | | | capped_index | table | NULL | NULL | | | capped_seal | table | NULL | NULL | | | capped_status | table | NULL | NULL | | | capped_tables | table | NULL | NULL | | | capped_vector_search | table | NULL | NULL | | | capped_version | scalar | NULL | NULL | | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings | name | description | input_type | scope | aliases | typed_value | |-----------------------------|---------------------------------------------------------------------------------------------------|------------|--------|---------|-------------| | capped_pending_delete_grace | capped: grace for orphan-GC candidates and newly queued pending deletes (duration, default 5 min) | VARCHAR | GLOBAL | [] | 5 min | | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |