Pinot:可读日期时间格式的架构
我正在将卡夫卡的实时数据消耗到皮诺中。数据的日期时间格式如下:
“Mon Mar 14 15:58:24 IST 2022”
我正在努力在架构文件中写入“dateTimeFieldSpecs”。 你能帮我一下吗?
谢谢,
苏库马尔
I am consuming real time data of kafka into pinot. Date time format of data is given below:
"Mon Mar 14 15:58:24 IST 2022"
I am struggling to write "dateTimeFieldSpecs" in schema file.
Can you please help me out.
Thanks,
Sukumar
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用转换函数来为您做到这一点。
首先将该列添加到常规
schema.json
中。之后,在表设置中添加一个转换函数,通常是table.json
。该函数接受原始列并将其重新格式化为 Pinot 的类型。但请记住,可能有必要检查服务器与本地时区,尤其是在实时表中。
查看这些文档
希望这有帮助!
you can use the transformation functions to do that for you.
First add the column to your regular
schema.json
. After that, add a transformation function to the table settings, usually,table.json
. This function takes in the original column and re-formats it to Pinot's type.Bare in mind though, it may be necessary to check server vs. local time zones, especially in real-time tables.
Check out these docs
Hope this helps!
至少配置下面有两个选项对应于格式
yyyy-MM-ddTHH:mm:ss.SSSZ
的字段:添加转换函数到表配置:
at least you have two options below config corresponds to field in format
yyyy-MM-ddTHH:mm:ss.SSSZ
:with transform function added to table config: