Storage ID Usage
Use this guide when you want to control where table data is stored, pick storage per table, and understand user-table routing behavior.
For MinIO-specific S3-compatible setup, see /docs/server/integrations/minio. For the storage architecture, see /docs/server/architecture/storage-tiers, /docs/server/architecture/manifests, and /docs/server/architecture/table-types.
Create storage backends first
Before using STORAGE_ID in CREATE TABLE, the storage must exist in system.storages.
Filesystem storage
PATH is supported for filesystem storage. BASE_DIRECTORY is also accepted.
S3 storage
For S3, you can use either:
BUCKET 'bucket-name'(optionally withREGION)BASE_DIRECTORY 's3://bucket/prefix'
Useful checks:
Use STORAGE_ID in CREATE TABLE
KalamDB accepts STORAGE_ID in WITH (...) table options.
Shared table with explicit storage
User table with explicit storage and flush policy
If STORAGE_ID is omitted
If omitted, KalamDB resolves storage to local by default.
Verify table storage metadata
Inspect table metadata in system.schemas:
Change table storage metadata
For USER and SHARED tables, admins can update STORAGE_ID with ALTER TABLE ... SET TBLPROPERTIES:
The new storage ID must already exist in system.storages.
Per-user storage routing (USE_USER_STORAGE)
For USER tables, you can enable per-user storage routing metadata:
Rules:
USE_USER_STORAGEis valid only forTYPE = 'USER'STORAGE_IDremains fallback storage for the table- User preference fields exist in
system.users(storage_mode,storage_id)
You can also toggle it after creation:
Changing storage per user (current status)
Current SQL behavior:
- DML against
system.*tables is blocked ALTER USERcurrently supports onlySET PASSWORD,SET ROLE, andSET EMAIL
So there is no public SQL command yet to directly update a user’s storage_mode or storage_id.
Current developer workflow:
- Set table-level routing with
STORAGE_ID(optionallyUSE_USER_STORAGE) - For user-level overrides, use internal/admin backend flows
Related Architecture
- /docs/server/architecture/storage-tiers
- /docs/server/architecture/manifests
- /docs/server/architecture/table-types
Common failures
Unknown storage ID
Expected error pattern:
Invalid USE_USER_STORAGE on non-user table
Expected error pattern: