Configuration Reference
Properties
| Property | Default | Description |
|---|---|---|
yaci.store.analytics.enabled | false | Enable analytics store |
yaci.store.analytics.export-path | ./data/analytics | Output directory for exported files |
yaci.store.analytics.finalization-lag-days | 2 | Days to lag behind tip (ensures immutability) |
yaci.store.analytics.enabled-tables | (empty = all) | Comma-separated list of tables to export |
yaci.store.analytics.admin.enabled | false | Enable admin REST API |
yaci.store.analytics.storage.type | ducklake | Storage format: ducklake or parquet |
yaci.store.analytics.state-management.stale-timeout-minutes | 60 | Timeout before stuck exports are recovered |
yaci.store.analytics.continuous-sync.buffer-days | 2 | Buffer days for continuous sync |
yaci.store.analytics.continuous-sync.sync-check-interval-minutes | 15 | Gap detection interval when fully synced |
yaci.store.analytics.continuous-sync.catch-up-interval-minutes | 1 | Gap detection interval when catching up |
yaci.store.analytics.continuous-sync.export-after-sync | true | Defer exports until the sync reaches chain tip. Set false to export during the sync |
yaci.store.analytics.parquet-export.codec | ZSTD | Compression codec |
yaci.store.analytics.parquet-export.compression-level | 3 | ZSTD compression level (1-22) |
yaci.store.analytics.parquet-export.row-group-size | -1 | Parquet row group size (-1 = DuckDB default ~122,880 rows) |
yaci.store.analytics.ducklake.catalog-type | postgresql | DuckLake catalog: postgresql or duckdb |
yaci.store.analytics.ducklake.catalog-url | (main datasource) | PostgreSQL URL for catalog |
yaci.store.analytics.ducklake.catalog-username | (main datasource) | PostgreSQL catalog username |
yaci.store.analytics.ducklake.catalog-password | (main datasource) | PostgreSQL catalog password |
yaci.store.analytics.ducklake.catalog-path | ./data/analytics/ducklake.catalog.db | DuckDB catalog file path |
yaci.store.analytics.duckdb.memory-limit | (empty = DuckDB default) | DuckDB buffer manager memory limit (e.g., 1GB, 512MB) |
yaci.store.analytics.ducklake.export.codec | ZSTD | Compression codec for DuckLake Parquet files |
yaci.store.analytics.ducklake.export.compression-level | 3 | ZSTD compression level (1-22) for DuckLake exports |
yaci.store.analytics.ducklake.export.row-group-size | -1 | Row group size for DuckLake Parquet files (-1 = DuckDB default) |
yaci.store.analytics.exporter.{name}.enabled | true | Per-exporter enable/disable (e.g., exporter.reward.enabled=false) |
Known Caveats
Workspace-sensitive catalog path (DuckLake)
DuckLake stores DATA_PATH in catalog metadata. If you use a relative export-path (e.g., ./data/analytics), the Parquet file paths in the catalog are relative to the working directory where yaci-store was started.
When querying with DuckDB CLI or Python, you must start from the same working directory as the application. Otherwise, DuckLake will fail to locate the Parquet files.
Recommendation: Use absolute paths in production:
yaci.store.analytics.export-path=/var/lib/yaci-store/analyticsDuckDB memory usage in JVM
If not configured, DuckDB uses its default (80% of system RAM). It is recommended to set this explicitly in production and container environments to prevent OOM kills.
DuckDB defaults to using 80% of system physical RAM for its buffer manager. Since DuckDB runs inside the JVM process, this can cause memory contention — JVM heap + DuckDB buffer may together exceed available system RAM, leading to OOM kills (especially in containers/Kubernetes).
To limit DuckDB memory usage:
# Limit DuckDB buffer manager to 1GB per connection
yaci.store.analytics.duckdb.memory-limit=1GBNote: With writer pool (1 connection) + reader pool (N connections), total potential DuckDB memory is memory_limit * (1 + N). Some DuckDB aggregate functions may also allocate memory outside the buffer manager, so actual usage can slightly exceed the configured limit.
DuckLake requires public schema in PostgreSQL
DuckLake stores its metadata tables in the public schema. The application automatically creates this schema if it doesn’t exist. If your PostgreSQL instance restricts schema creation, ensure public exists before enabling DuckLake.
Admin API
The admin API provides manual control over exports when enabled (yaci.store.analytics.admin.enabled=true).
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/analytics/admin/tables | List all registered exporters |
| GET | /api/v1/analytics/admin/status | Current sync status |
| GET | /api/v1/analytics/admin/statistics/{table} | Export statistics for a table |
| POST | /api/v1/analytics/admin/export/date/{date} | Export all daily tables for a date |
| POST | /api/v1/analytics/admin/export/table/{table}/date/{date} | Export specific table for a date |
| POST | /api/v1/analytics/admin/export/table/{table}/epoch/{epoch} | Export specific table for an epoch |
| POST | /api/v1/analytics/admin/export/table/{table}/range | Backfill date range |
| POST | /api/v1/analytics/admin/export/table/{table}/epoch-range | Backfill epoch range |
| POST | /api/v1/analytics/admin/sync/trigger | Trigger immediate gap sync |
| DELETE | /api/v1/analytics/admin/state/{table}/{partition} | Reset export state |
| DELETE | /api/v1/analytics/admin/state/{table}/range | Reset date range state |
Example: Export and query a specific date
# Trigger export for a specific date
curl -X POST http://localhost:8080/api/v1/analytics/admin/export/date/2024-01-15
# Query the exported data
duckdb -c "SELECT COUNT(*) FROM read_parquet('./data/analytics/transaction/date=2024-01-15/*.parquet');"