Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to override ECS fields type from keyword to constant_keyword #969

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Sep 8, 2022

Support the case of defining the value of a constant_keyword for fields that are defined as keyword in ECS.

Current workaround is to define the whole field on each data stream instead of importing it, so the constant_keyword type can be set along with a value. Something like this:

- name: event.dataset
  type: constant_keyword
  description: Event dataset
  value: apache.access

With this change, it will be allowed to reuse the definition from ECS:

- name: event.dataset
  external: ecs
  type: constant_keyword
  value: apache.access

This is helpful to have consistent descriptions and other settings in more complex fields.

@jsoriano jsoriano self-assigned this Sep 8, 2022
@jsoriano jsoriano requested a review from a team September 8, 2022 14:24
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 8, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-09-12T08:48:37.998+0000

  • Duration: 37 min 1 sec

Test stats 🧪

Test Results
Failed 0
Passed 829
Skipped 0
Total 829

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 8, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (34/34) 💚
Files 66.929% (85/127) 👍
Classes 61.667% (111/180) 👍
Methods 48.834% (356/729) 👍
Lines 32.231% (3225/10006) 👍 0.027
Conditionals 100.0% (0/0) 💚

Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for leaving a comment there :) You can get lost with all these rules.

@jsoriano jsoriano merged commit e3359af into elastic:main Sep 12, 2022
@jsoriano jsoriano deleted the allow-override-constant-keyword branch September 12, 2022 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants