Re: mapGroupsWithState in Python

2018-01-31 Thread ayan guha
nk from table1) tmp where rank =1") >>> >>> But now I would like to do it in Structured Stream. I need to maintain >>> the state of id as per the highest last_updated, across the triggers, for a >>> certain period (24 hours). >>> >>> Q

Re: mapGroupsWithState in Python

2018-01-31 Thread Tathagata Das
f id as per the highest last_updated, across the triggers, for a >> certain period (24 hours). >> >> Questions: >> >> 1. Should I use mapGroupsWithState or is there any other (SQL?) >> solution? Can anyone help me to write it? >> 2. Is mapGroupsWithState supported

Re: mapGroupsWithState in Python

2018-01-30 Thread ayan guha
t; But now I would like to do it in Structured Stream. I need to maintain the > state of id as per the highest last_updated, across the triggers, for a > certain period (24 hours). > > Questions: > > 1. Should I use mapGroupsWithState or is there any other (SQL?) solution? > Can any

mapGroupsWithState in Python

2018-01-28 Thread ayan guha
ould I use mapGroupsWithState or is there any other (SQL?) solution? Can anyone help me to write it? 2. Is mapGroupsWithState supported in Python? Just to ensure we cover bases, I have already tried using dropDuplicates, but it is keeping the 1st record encountered for an Id, not updating