diff --git a/CHANGELOG.md b/CHANGELOG.md index 7363ac02b..601477274 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Breaking changes +* Change dataset.* fields to datastream.* fields. [#618](https://github.com/elastic/package-registry/pull/618) + ### Bugfixes ### Added diff --git a/testdata/package/datasources/1.0.0/dataset/examplelog1/fields/base-fields.yml b/testdata/package/datasources/1.0.0/dataset/examplelog1/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/datasources/1.0.0/dataset/examplelog1/fields/base-fields.yml +++ b/testdata/package/datasources/1.0.0/dataset/examplelog1/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/testdata/package/datasources/1.0.0/dataset/examplelog2/fields/base-fields.yml b/testdata/package/datasources/1.0.0/dataset/examplelog2/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/datasources/1.0.0/dataset/examplelog2/fields/base-fields.yml +++ b/testdata/package/datasources/1.0.0/dataset/examplelog2/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/testdata/package/datasources/1.0.0/dataset/examplemetric/fields/base-fields.yml b/testdata/package/datasources/1.0.0/dataset/examplemetric/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/datasources/1.0.0/dataset/examplemetric/fields/base-fields.yml +++ b/testdata/package/datasources/1.0.0/dataset/examplemetric/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/testdata/package/default_pipeline/0.0.2/dataset/foo/fields/base-fields.yml b/testdata/package/default_pipeline/0.0.2/dataset/foo/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/default_pipeline/0.0.2/dataset/foo/fields/base-fields.yml +++ b/testdata/package/default_pipeline/0.0.2/dataset/foo/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/testdata/package/ecs_style_dataset/0.0.1/dataset/foo/fields/fields.yml b/testdata/package/ecs_style_dataset/0.0.1/dataset/foo/fields/fields.yml index 1d42dc982..3f9d1f4fa 100644 --- a/testdata/package/ecs_style_dataset/0.0.1/dataset/foo/fields/fields.yml +++ b/testdata/package/ecs_style_dataset/0.0.1/dataset/foo/fields/fields.yml @@ -3,24 +3,24 @@ description: > Event timestamp. -- name: dataset - title: dataset +- name: datastream + title: datastream group: 2 description: Fields describing the new indexing strategy -- type: group fields: - - name: name + - name: dataset level: custom type: constant_keyword - description: Dataset name. + description: Datastream dataset. default_field: false - name: namespace level: custom type: constant_keyword - description: Dataset namespace. + description: Datastream namespace. default_field: false - name: type level: custom type: constant_keyword - description: Dataset type. + description: Datastream type. default_field: false diff --git a/testdata/package/example/1.0.0/dataset/foo/fields/base-fields.yml b/testdata/package/example/1.0.0/dataset/foo/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/example/1.0.0/dataset/foo/fields/base-fields.yml +++ b/testdata/package/example/1.0.0/dataset/foo/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/testdata/package/multiple_false/0.0.1/dataset/foo/fields/base-fields.yml b/testdata/package/multiple_false/0.0.1/dataset/foo/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/multiple_false/0.0.1/dataset/foo/fields/base-fields.yml +++ b/testdata/package/multiple_false/0.0.1/dataset/foo/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/testdata/package/no_stream_configs/1.0.0/dataset/log/fields/base-fields.yml b/testdata/package/no_stream_configs/1.0.0/dataset/log/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/no_stream_configs/1.0.0/dataset/log/fields/base-fields.yml +++ b/testdata/package/no_stream_configs/1.0.0/dataset/log/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/testdata/package/reference/1.0.0/dataset/reference/fields/base-fields.yml b/testdata/package/reference/1.0.0/dataset/reference/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/reference/1.0.0/dataset/reference/fields/base-fields.yml +++ b/testdata/package/reference/1.0.0/dataset/reference/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/testdata/package/yamlpipeline/1.0.0/dataset/log/fields/base-fields.yml b/testdata/package/yamlpipeline/1.0.0/dataset/log/fields/base-fields.yml index 932b03ae6..bb0c4e9cb 100644 --- a/testdata/package/yamlpipeline/1.0.0/dataset/log/fields/base-fields.yml +++ b/testdata/package/yamlpipeline/1.0.0/dataset/log/fields/base-fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: datastream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Datastream type. +- name: datastream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Datastream dataset. +- name: datastream.namespace type: constant_keyword description: > - Dataset namespace. + Datastream namespace. - name: "@timestamp" type: date description: > diff --git a/util/dataset.go b/util/dataset.go index 6dc3ec845..f28f0e390 100644 --- a/util/dataset.go +++ b/util/dataset.go @@ -305,9 +305,9 @@ func (d *Dataset) validateRequiredFields() error { } // Verify required keys - err = requireField(allFields, "dataset.type", "constant_keyword", err) - err = requireField(allFields, "dataset.name", "constant_keyword", err) - err = requireField(allFields, "dataset.namespace", "constant_keyword", err) + err = requireField(allFields, "datastream.type", "constant_keyword", err) + err = requireField(allFields, "datastream.dataset", "constant_keyword", err) + err = requireField(allFields, "datastream.namespace", "constant_keyword", err) err = requireField(allFields, "@timestamp", "date", err) return err }