cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Analyzing user session in USQL

william_cher
Participant

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.

 

0 REPLIES 0