diff --git a/cmd/testdata/configurations/schema-enable-disable/expected.yaml b/cmd/testdata/configurations/schema-enable-disable/expected.yaml index 7fdc56b4..53c299b4 100644 --- a/cmd/testdata/configurations/schema-enable-disable/expected.yaml +++ b/cmd/testdata/configurations/schema-enable-disable/expected.yaml @@ -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 diff --git a/common/schema/config.go b/common/schema/config.go index d75fd3ef..1e73b5f2 100644 --- a/common/schema/config.go +++ b/common/schema/config.go @@ -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. diff --git a/common/schema/root.go b/common/schema/root.go index 59d2dbdf..7c0ad4f2 100644 --- a/common/schema/root.go +++ b/common/schema/root.go @@ -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 diff --git a/console/data/docs/02-configuration.md b/console/data/docs/02-configuration.md index a42d47d3..c4c3c74d 100644 --- a/console/data/docs/02-configuration.md +++ b/console/data/docs/02-configuration.md @@ -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. diff --git a/console/data/docs/99-changelog.md b/console/data/docs/99-changelog.md index f1342086..5e4ff392 100644 --- a/console/data/docs/99-changelog.md +++ b/console/data/docs/99-changelog.md @@ -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