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

Add coercion functions to the remap syntax #3722

Closed
5 tasks done
binarylogic opened this issue Sep 5, 2020 · 1 comment · Fixed by #3341
Closed
5 tasks done

Add coercion functions to the remap syntax #3722

binarylogic opened this issue Sep 5, 2020 · 1 comment · Fixed by #3341
Assignees
Labels
domain: vrl Anything related to the Vector Remap Language transform: remap Anything `remap` transform related type: feature A value-adding code addition that introduce new functionality.

Comments

@binarylogic
Copy link
Contributor

binarylogic commented Sep 5, 2020

A common use for the new remap syntax will be the need to coerce log fields to different types. This helps with the generic processing of log data and ensuring a consistent schema. It should deprecate the coercer transform.

Usage

All of these functions should be used on the right side of the = when evaluating:

.message = string(.message)
.status = int(.status)

Requirements

  • Add a string(.path.to.field) function
  • Add a int(.path.to.field) function
  • Add a float(.path.to.field) function
  • Add a bool(.path.to.field) function
  • Add a timestamp(.path.to.field, "%F") function
@binarylogic binarylogic added the type: feature A value-adding code addition that introduce new functionality. label Sep 5, 2020
@binarylogic
Copy link
Contributor Author

This appears to have already been covered in #3341.

@JeanMertz JeanMertz self-assigned this Sep 8, 2020
@JeanMertz JeanMertz added the transform: remap Anything `remap` transform related label Sep 25, 2020
@binarylogic binarylogic added the domain: vrl Anything related to the Vector Remap Language label Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: vrl Anything related to the Vector Remap Language transform: remap Anything `remap` transform related type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants