Druid Query: How to Compare Two dimension Values of same record??

Hi,

I am a newbie in druid. I have two problem with my query. May be it will be a dumb question in druid scenario.

  1. How to check the value of two dimension’s are equal?

    I have profile_visit_event with the following fields [ “userId” , “guestLocation”, “profileId”, “hostLocation”, “timeStamp”, “eventName”]. What I want is the count of users who visits profiles from their own location.

  2. How to find the time elapsed/difference between two events?

    for ex: Time elapsed/difference between two login event of a user.
    I want a list of count of users who logging in after 1,2,3,4,5… days. login_event [ “userId”, “timeStamp”, “eventName”]

I tried all of the queries in druid.io docs but not find a way to solve this problem.

Is it possible to query in druid?

If it is not possible then how do you guys manage to get similar results with druid.

please give me insights

Thanks

Hi Alex,

As for (1) that is not currently possible (unless you add a column of ‘isUserAtHome’ at ingestion time). Sorry for the disappointing answer but could I please ask you to +1 this issue: https://github.com/druid-io/druid/issues/1885 that would solve your problem?

Best regards,

Vadim