diff --git a/CHANGELOG.md b/CHANGELOG.md index 27fcefb88..cb6ea2348 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 stream.* fields to dataset.* fields. [#](https://github.com/elastic/package-registry/pull/) + ### Bugfixes ### Added diff --git a/dev/generator/main.go b/dev/generator/main.go index ac9825601..9e4f9fc81 100644 --- a/dev/generator/main.go +++ b/dev/generator/main.go @@ -29,18 +29,18 @@ var ( const ( packageDirName = "package" streamFields = ` -- name: stream.type +- name: dataset.type type: constant_keyword description: > - Stream type -- name: stream.dataset + Dataset type. This can be logs or metrics. +- name: dataset.name type: constant_keyword description: > - Stream dataset. -- name: stream.namespace + Dataset name. +- name: dataset.namespace type: constant_keyword description: > - Stream namespace. + Dataset namespace. - name: "@timestamp" type: date description: > @@ -301,9 +301,9 @@ func validateRequiredFields(datasetPath string) error { } // Verify required keys - err = requireField(allFields, "stream.type", "constant_keyword", err) - err = requireField(allFields, "stream.dataset", "constant_keyword", err) - err = requireField(allFields, "stream.namespace", "constant_keyword", err) + 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, "@timestamp", "date", err) return err } diff --git a/dev/packages/example/base/0.2.0/elasticsearch/component-template/events-mappings.json b/dev/packages/example/base/0.2.0/elasticsearch/component-template/events-mappings.json index bf0280cdf..1d28f0fad 100644 --- a/dev/packages/example/base/0.2.0/elasticsearch/component-template/events-mappings.json +++ b/dev/packages/example/base/0.2.0/elasticsearch/component-template/events-mappings.json @@ -19,13 +19,13 @@ "@timestamp": { "type": "date" }, - "stream": { + "dataset": { "properties": { "type": { "type": "constant_keyword", "value": "events" }, - "dataset": { + "name": { "type": "constant_keyword" }, "namespace": { diff --git a/dev/packages/example/base/0.2.0/elasticsearch/component-template/logs-mappings.json b/dev/packages/example/base/0.2.0/elasticsearch/component-template/logs-mappings.json index 4fdfb334f..383727b84 100644 --- a/dev/packages/example/base/0.2.0/elasticsearch/component-template/logs-mappings.json +++ b/dev/packages/example/base/0.2.0/elasticsearch/component-template/logs-mappings.json @@ -19,13 +19,13 @@ "@timestamp": { "type": "date" }, - "stream": { + "dataset": { "properties": { "type": { "type": "constant_keyword", "value": "logs" }, - "dataset": { + "name": { "type": "constant_keyword" }, "namespace": { diff --git a/dev/packages/example/base/0.2.0/elasticsearch/component-template/metrics-mappings.json b/dev/packages/example/base/0.2.0/elasticsearch/component-template/metrics-mappings.json index a5aa0847a..b50eae14d 100644 --- a/dev/packages/example/base/0.2.0/elasticsearch/component-template/metrics-mappings.json +++ b/dev/packages/example/base/0.2.0/elasticsearch/component-template/metrics-mappings.json @@ -19,13 +19,13 @@ "@timestamp": { "type": "date" }, - "stream": { + "dataset": { "properties": { "type": { "type": "constant_keyword", "value": "metrics" }, - "dataset": { + "name": { "type": "constant_keyword" }, "namespace": {