Skip to content

[Change Proposal][Bug] Allow boolean as a TSDB dimension #1106

@AndersonQ

Description

@AndersonQ

The current spec/validation rules for TSDB fields that are allowed to be dimensions are missing boolean. Currently it's a valid type to be a dimension, see docs. However when building a package setting boolean as TSDB dimensions an validation error is shown:

Error: package installation failed: failed to build package: invalid content found in built zip package: found 8 validation errors:
   1. file "/home/user/devel/github.com/elastic/integrations/build/packages/linux-1.1.0.zip/data_stream/conntrack/fields/agent.yml" is invalid: field "host.containerized" of type boolean can't be a dimension, allowed types for dimensions: constant_keyword, keyword, long, integer, short, byte, double, float, half_float, scaled_float, unsigned_long, ip

It'd be good to update the spec and elastic-package to support boolean as it's now supported by Elasticsearch.

The list of supported types for dimension fields is validated in

var allowedDimensionTypes = []string{

The first version of Elasticsearch that documents boolean as supported type for dimension is 8.16 (here), so it should be supported only on versions of the spec over 3.1, see https://github.com/elastic/elastic-package/blob/main/docs/howto/format_version.md#what-format-version-to-choose-for-a-package

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussIssue needs discussion

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions