Skip to content

Multiline condition escaping in YAML #14916

Answered by neuronull
sbalmos asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @sbalmos !
The VRL expressions over multiple lines is a bit arbitrary as to when it works currently- something we hope to improve going forward.
I was able to get this to pass vector validate with:

transforms:
  trial:
    type: filter
    inputs:
    - foo
    condition: |
      .message.field1 == "foo" &&
        (includes([ "bar", "baz", ], .message.field2) ||
        .message.elsewhere_id == 3)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jszwedko
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants