jolt - 需要帮助来创建 Jolt 规范
问题描述
需要有关将 JSON 从共享输入格式转换为预期格式的 JOLT 规范的帮助。
[
{
"Header": {
"TeamCD": 2
},
"Player": [
{
"PlayerNumber": 1,
"ShortName": "John",
"UniformNO": 11,
"SmartStart": 20200201,
"SmartEnd": 99999999
},
{
"PlayerNumber": 2,
"ShortName": "James",
"UniformNO": 12,
"SmartStart": 20200201,
"SmartEnd": 99999999
}
]
}
]
期望的输出:
[
{
"Field": "TeamCD",
"Type": "20"
"Value": 2,
"Vendor": "Vendor1"
},
{
"Field": "PlayerNumber",
"Type": "23"
"Value": 1,
"Vendor": "Vendor1"
},
{
"Field": "ShortName",
"Type": "24"
"Value": "John",
"Vendor": "Vendor1"
},
{
"Field": "PlayerNumber",
"Type": "23"
"Value": 2,
"Vendor": "Vendor1"
},
{
"Field": "ShortName",
"Type": "24"
"Value": "James",
"Vendor": "Vendor1"
}
]
我现在正在尝试使用 JoltTransformJSON 来实现这一点。这可以使用 JoltTransformJSON 实现吗?我让它在 Nifi 上运行,如果不能使用 Jolt,我有什么选择?
解决方案
推荐阅读
- swift - Alamofire 和 Codable 问题解析响应
- java - 如何在 thymeleaf 页面中显示我的 api 所有 json 响应数据?
- python - 抓取电子邮件地址时无法删除不需要的东西
- javascript - javascript匹配函数总是返回null
- css - React.js 和 styled-components - 带有(错觉)元素的样式化输入
- javascript - 另一个发出值时可观察到 RxJS 错误
- python - 如何根据每行中的数据以及满足特定条件的其他行的存在向 Pandas Dataframe 添加新列?
- c++ - 使用类和函数来跟踪用户统计信息
- html - Spring Boot (v2.3.3):Thymeleaf & Flying Saucer PDF,HTML 被渲染切断页面
- javascript - 如何让旋转滑块上的图像完美适合浏览器(HTML)