Merged
Conversation
lookup default_match field.
field when detection is read from YML file with PyYAML
pyth0n1c
commented
Mar 10, 2025
Contributor
Author
pyth0n1c
left a comment
There was a problem hiding this comment.
transforms.conf is identical after the change

This also fixes an issue where if default_match was not defined, it would be written as "false" in any api objects with a serialized lookup. For instance:

Because this is now always treated as a string (not a bool) if this field is not defined then it is an empty string, which is the default value for this field:
https://docs.splunk.com/Documentation/Splunk/9.4.1/Admin/Transformsconf#:~:text=provided%20(see%20below).-,default_match,-%3D%20%3Cstring%3E%0A*%20If%20min_matches
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bug was reported where
default_matchwas typed as abool, but in reality should be astr.This has been fixed and it has been given a default value of
''in line with the default value of this field per transforms.conf documentation: https://docs.splunk.com/Documentation/Splunk/9.4.0/Admin/Transformsconf#:~:text=default_match%20%3D%20%3Cstring%3E%0A*%20If%20min_matches%20%3E%200%20and%20Splunk%20software%20has%20less%20than%20min_matches%20for%20any%0A%20%20given%20input%2C%20it%20provides%20this%20default_match%20value%20one%20or%20more%20times%20until%20the%0A%20%20min_matches%20threshold%20is%20reached.%0A*%20Default%3A%20empty%20string.