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

Support for Additional Data Type Conversion in Grok Patterns #1061

Open
Anton0C opened this issue Oct 2, 2024 · 0 comments
Open

Support for Additional Data Type Conversion in Grok Patterns #1061

Anton0C opened this issue Oct 2, 2024 · 0 comments
Labels
vrl: stdlib Changes to the standard library

Comments

@Anton0C
Copy link

Anton0C commented Oct 2, 2024

Description:

It would be beneficial to extend Grok’s current functionality by allowing users to specify the type of attribute value to extract. At present, all semantic values are stored as strings by default. However, users might want to convert the extracted values into different data types for further processing.

Proposed Enhancement:

Add support for additional data type conversions within Grok patterns. Users can specify the target data type by suffixing the semantic in the pattern, such as %{NUMBER:num:int} to convert the num semantic from a string to an integer.

For instance, this pattern:

%{NUMBER:Basic:float} %{NUMBER:Basic_long:long}

would convert the Basic semantic to a float and Basic_long to a long integer 🌟

@jszwedko jszwedko added the vrl: stdlib Changes to the standard library label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vrl: stdlib Changes to the standard library
Projects
None yet
Development

No branches or pull requests

2 participants