I'm having trouble finding how to convert a pyspark window statement into the equivalent SQL format.
Example:
eventsDF \
.groupBy(
"deviceId",
window("eventTime", "10 minutes", "5 minutes")) \
.count()
It should be something like:
select window, deviceId, count(deviceId)
from events
group by window eventTime 10 minutes 5 minutes, deviceId