У меня есть полезная нагрузка, как показано ниже. Мне нужно получить первые отдельные значения партии для каждого 1-минутного периода. Пожалуйста, дайте мне знать, как добиться этого в потоковой аналитике, используя isfirst и lag или last
Вывод, например:
BATCH = 01, "2015-01-01T00: 00: 01.0000000Z" BATCH = 02, «2015-01-01T00: 00: 03.0000000Z», BATCH = 03, «2015-01-01T00: 00: 06.0000000Z», BATCH = 01, «2015-01-01T00: 00: 14.0000000Z», BATCH = 02, «2015-01-01T00: 00: 18.0000000Z» ДАТА = 03, «2015-01-01T00: 00: 22.0000000Z» ДАТА = 01, «2015-01-01T00: 00: 27.0000000Z» ДАТА = 01, «2015 -01-01T00: 00: 31.0000000Z "
Pay Load:
[{
"Payload": {
"Make": "BATCH1",
"VAL": "01",
"TS": "2015-01-01T00:00:01.0000000Z"
}
},
{
"Payload": {
"Make": "BATCH1",
"VAL": "01",
"TS": "2015-01-01T00:00:02.0000000Z"
}
},
{
"Payload": {
"Make": "BATCH1",
"VAL": "02",
"TS": "2015-01-01T00:00:03.0000000Z"
}
},
{
"Payload": {
"Make": "BATCH1",
"VAL": "02",
"TS": "2015-01-01T00:00:04.0000000Z"
}
},
{
"Payload": {
"Make": "BATCH1",
"VAL": "02",
"TS": "2015-01-01T00:00:05.0000000Z"
}
},
{"Payload": {
"Make": "BATCH1",
"VAL": "03",
"TS": "2015-01-01T00:00:06.0000000Z"
}
},
{"Payload": {
"Make": "BATCH1",
"VAL": "03",
"TS": "2015-01-01T00:00:07.0000000Z"
}
},
{"Payload": {
"Make": "BATCH1",
"VAL": "03",
"TS": "2015-01-01T00:00:10.0000000Z"
}
},
{"Payload": {
"Make": "BATCH1",
"VAL": "03",
"TS": "2015-01-01T00:00:11.0000000Z"
}
},
{"Payload": {
"Make": "BATCH1",
"VAL": "03",
"TS": "2015-01-01T00:00:12.0000000Z"
}
},
{"Payload": {
"Make": "BATCH2",
"VAL": "01",
"TS": "2015-01-01T00:00:13.0000000Z"
}
},
{"Payload": {
"Make": "BATCH2",
"VAL": "01",
"TS": "2015-01-01T00:00:14.0000000Z"
}
},
{"Payload": {
"Make": "BATCH2",
"VAL": "01",
"TS": "2015-01-01T00:00:15.0000000Z"
}
},
{"Payload": {
"Make": "BATCH2",
"VAL": "01",
"TS": "2015-01-01T00:00:16.0000000Z"
}
},
{"Payload": {
"Make": "BATCH2",
"VAL": "01",
"TS": "2015-01-01T00:00:17.0000000Z"
}
},
{"Payload": {
"Make": "BATCH2",
"VAL": "02",
"TS": "2015-01-01T00:00:18.0000000Z"
}
},
{"Payload": {
"Make": "BATCH2",
"VAL": "02",
"TS": "2015-01-01T00:00:20.0000000Z"
}
},
{"Payload": {
"Make": "BATCH2",
"VAL": "02",
"TS": "2015-01-01T00:00:21.0000000Z"
}
},
{"Payload": {
"Make": "BATCH3",
"VAL": "02",
"TS": "2015-01-01T00:00:22.0000000Z"
}
},
{"Payload": {
"Make": "BATCH3",
"VAL": "02",
"TS": "2015-01-01T00:00:23.0000000Z"
}
},
{"Payload": {
"Make": "BATCH3",
"VAL": "02",
"TS": "2015-01-01T00:00:24.0000000Z"
}
},
{"Payload": {
"Make": "BATCH3",
"VAL": "02",
"TS": "2015-01-01T00:00:25.0000000Z"
}
},
{"Payload": {
"Make": "BATCH3",
"VAL": "02",
"TS": "2015-01-01T00:00:26.0000000Z"
}
},
{"Payload": {
"Make": "BATCH4",
"VAL": "01",
"TS": "2015-01-01T00:00:27.0000000Z"
}
},
{"Payload": {
"Make": "BATCH4",
"VAL": "01",
"TS": "2015-01-01T00:00:28.0000000Z"
}
},
{"Payload": {
"Make": "BATCH4",
"VAL": "01",
"TS": "2015-01-01T00:00:29.0000000Z"
}
},
{"Payload": {
"Make": "BATCH4",
"VAL": "01",
"TS": "2015-01-01T00:00:30.0000000Z"
}
},
{"Payload": {
"Make": "BATCH5",
"VAL": "01",
"TS": "2015-01-01T00:00:31.0000000Z"
}
}
]