How to query data from different user in a workflow

Here's how you can query data from a different user in a workflow.

 

python:

import Analytics

import Filter
import DateRange

#x returns a list of the last 10 events under the 'raw' stream
x = Analytics.events(stream_name='raw', limit=10)

#y returns a list of the last 10 events of this hour, from the 'raw.myoutkey' tag, with a value equal to the string 'hello world', in ascending order from user1
y = Analytics.events('raw', Filter.string_tag('raw.myoutkey').equal_to('hello world'), DateRange.this_hour(), 10, ['observed_at', 'ASC'], user="user1")