如何将火花中的时间戳数据汇总到较小的时间范围
我正在使用纽约出租车数据从事一个项目。数据包含拾取位置的记录(PulocationId
),以及该特定拾取记录的时间戳(tpep_pickup_datetime
)。
我想将数据汇总为每个位置的每小时。汇总应每小时每小时拾取。
I'm working on a project using New York taxi data. The data contain records for pickup location (PULocationID
), and the timestamp (tpep_pickup_datetime
) for that particular pick-up record.
I want to aggregate the data to be hourly for each location. The aggregation should have an hourly count of pick-ups per location.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您提供的信息有点缺乏。据我了解,这些可能是可能的聚合选项。
使用
date_trunc
使用
window> window> window
The information you provided is a bit lacking. From what I understood, these could be possible aggregation options.
Using
date_trunc
Using
window