0

I have an array with a list of unique literal strings (ids) and I want to use the "in" keyword to test for set membership. I've used the following query, the ephemeral field "id" extracts the id from the message.

fields @timestamp,@message, @logStream
| filter @message like /mutation CreateOrder/
| parse @message 'Parameters: *}], "id"=>"*"}}, "graphql"*' as rest_of_message, id
| parse @message '"variables"=>{"createOrderInput"=>*}, "graphql"' as variables
| filter id in ["182841661","182126710"]
| sort @timestamp desc
| limit 10000
| display id, variables

It was my assumption that it would match any message whose ephemeral field "id" matches any of the literal ids in the array. However, it's only matching the message that contain the first literal id in the array.

I've searched for both ids using the "like" key word and they both come up in the selected period.

Is it possible to do what I want to do? Is there a better way of doing it?

codeinaire
  • 1,682
  • 1
  • 13
  • 26

0 Answers0