Interaction.sample problems


I’m trying to use interaction.sample, and if I put in:

interaction.sample >= 80

I get nothing back

and if I put in

interaction.sample >= “80”

It gives me the error “requires a geo, not an integer”



Running interaction.sample >= 80 should also work without an issue - you can see a simple demo stream (see screenshot at the bottom of the page), working using this syntax. 

The error message returned when you turn 80 into a string "80" seems to be a bug - it should say that "interaction.sample reuires an integer value - not a string".

You can use interaction.sample to bring back 20% of the stream in two ways - either as interaction.sample >= 80 or as interaction.sample <= 20. Interaction.sample looks for a floating point number, which is randomly assigned to each interaction, so using the filter either way will return 1/5th of the total stream.

By default 100% of all available data is returned. Interaction.sample can be useful when testing streams, as you often just need a small sample of data to ensure your application works, and do not want to pay the licence costs of receiving the full stream at that time.



Ok, thanks for the answer… When I tried running the exact sample, without the “”, I didn’t get anything back in my sample stream. Here’s what confuses me, and why I used “80”. interaction.sample is a random float, right? Therefore, by saying >80, I’m actually only asking for 1/5, right?


My apologies - I have had some clarification on exactly how interaction.sample works, and have updated my previous comment.