12 Oct 2023 06:12 AM - last edited on 13 Dec 2023 10:54 AM by Ana_Kuzmenchuk
Given response_code column :
[, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 200, 200, , , , 200, 200, 402, , , , , , , , , , , , , , , , , , , , , , , , 200, 200, , , , 200, 200, 402, , , , , ] , [, , , , , , , , , , , , , , , , , , , , , , , , 200, 200, , , , 200, 200, 200, , , , 200, , , , , , ], ...
What's the most optimized USQL to count this where the array object contain only 200. For eg, Array object that contain 200 and 201 will not be counted.
I've used this :
WHERE useraction.stringProperties.response_code = "200"
It matches array object contain 200 and also other response. A not so elegant way is to create all condition that exlude response_code other than 200 like
WHERE NOT (useraction.stringProperties.response_codes LIKE "3*") AND NOT (...)
This would create so many rules that you can't create a custom metric with it.
13 Dec 2023 10:51 AM
Hi @william_cher , were you able to solve your issue in the meantime?
If not yet, maybe this doc can be an inspiration while the Community comes forward to help you out!