common/schema: rename generate to materialized

See #588
This commit is contained in:
Vincent Bernat
2023-03-30 22:47:12 +02:00
parent 91834abb0f
commit 23b453f573
5 changed files with 11 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ paths:
enabled:
- SrcMAC
- DstMAC
generate: []
materialize: []
maintableonly:
- SrcMAC
- DstMAC
@@ -19,7 +19,7 @@ paths:
enabled:
- SrcMAC
- DstMAC
generate: []
materialize: []
maintableonly:
- SrcMAC
- DstMAC

View File

@@ -15,8 +15,8 @@ type Configuration struct {
MainTableOnly []ColumnKey
// NotMainTableOnly lists columns to be moved out of the main table only
NotMainTableOnly []ColumnKey `validate:"ninterfield=MainTableOnly"`
// Generate lists columns that shall be generated at ingest instead of generated at query time
Generate []ColumnKey
// Materialize lists columns that shall be materialized at ingest instead of computed at query time
Materialize []ColumnKey
}
// DefaultConfiguration returns the default configuration for the schema component.

View File

@@ -22,7 +22,7 @@ type Component struct {
// New creates a new schema component.
func New(config Configuration) (*Component, error) {
schema := flows()
for _, k := range config.Generate {
for _, k := range config.Materialize {
if column, ok := schema.LookupColumnByKey(k); ok {
if column.ClickHouseAlias != "" {
column.ClickHouseGenerateFrom = column.ClickHouseAlias

View File

@@ -400,7 +400,7 @@ removing the `SrcCountry` and `DstCountry`, one can use:
```yaml
schema:
generate:
materialize:
- SrcNetPrefix
- DstNetPrefix
disabled:
@@ -411,8 +411,10 @@ schema:
- DstVlan
```
With `generate`, you can control if an dimension generated by other dimensions (e.g. the Prefixes) is computed at query time (the default) or the generated ingest time.
This reduces the query time, but increases the storage needs.
With `materialize`, you can control if an dimension computed from other
dimensions (e.g. `SrcNetPrefix` and `DstNetPrefix`) is computed at query time
(the default) or materialized at ingest time. This reduces the query time, but
increases the storage needs.
You can get the list of columns you can enable or disable with `akvorado
version`. Disabling a column won't delete existing data.

View File

@@ -13,6 +13,7 @@ identified with a specific icon:
## Unreleased
-*orchestrator*: add an option to materialize a column instead of using an alias
- 🩹 *inlet*: fix caching when setting interface name or description
## 1.8.1 - 2023-03-04