一、源端
1、ConsumerKafka
- @param hostList
- @param topicName
- @param groupId
2、JoltTransformJSON
- @param jolt transform
- 宁夏
- 单条Json解析规则示例: ```json // 实际数据 { “goldenId”:1603782, “pointTime”:”2022-01-07 16:06:22”, “tagName”:”QSFJ.NX_GD_QSF_FJ_P1_L3_032_AI0002”, “valueDouble”:1.600000023841858, “valueInt”:0, “valueType”:”Double” }
- 宁夏
// 解析规则 [{ “operation”: “shift”, “spec”: { “pointTime”: “pointTime”, “valueDouble”: “valueDouble”, “tagName”: “tagName” } }]
// 解析结果 { “pointTime”: “1970-01-01 00:00:00”, “valueDouble”: 1.0, “tagName”: “GDNXFD_P1_L1_A0921” }
2. 列表Json模式解析示例:
```json
// 实际数据
{
"dataCount":29,
"data":[
{
"key": "AAAAAAA",
"dataType": 10,
"time": "2021-01-01 00:00:00",
"data":66.983154296875
},{
"key":"BBBBBBB",
"dataType":10,
"time":"2021-01-01 00:00:01",
"data":66.91868591308594
}
]
}
// 解析规则
[{
"operation": "shift",
"spec": {
"data": {
"*": {
"time": "result[#2].pointTime",
"data": "result[#2].valueDouble",
"key": "result[#2].tagName"
}
}
}
}]
// 解析结果
{
"result": [
{
"pointTime": "2021-01-01 00:00:00",
"valueDouble": 66.983154296875,
"tagName": "AAAAAAA"
},
{
"pointTime": "2021-01-01 00:00:00",
"valueDouble": 66.91868591308594,
"tagName": "BBBBBBB"
}
]
}
3. othre
[{
"operation": "shift",
"spec": {
"Result": {
"*": {
"*": {
"$1": "&2[#2].tagName",
"Time": "&2[#2].pointTime",
"Value": "&2[#2].valueDouble"
}
}
}
}
}]
[{
"operation": "shift",
"spec": {
"Result": {
"*": {
"TagFullName": "&2[#2].tagName",
"Time": "&2[#2].pointTime",
"Value": "&2[#2].valueDouble"
}
}
}
}]
二、目标端
1、NIFI Flow
2、ExecuteGroovyScript
- @param TDUrl(必填)
- @param DBName(必填)
- @param STBName(可选,当且仅当子表已存在)
- @param model json的模式(single|list)
三、附页
1、附1页