I have a TICK script (shown below) with two queries, both performing groupBy
on the same tag. The script then joins the two queries on that tag and specifies a full outer join with a fill
of 'null'
. However Kapacitor seems to be treating it as a inner join as shown by the stats (also below). The queries emit 33 and 32 points each and the join emits 32. Shouldn't a full outer join emit at least as many points as the query with the greater point count (33)? When I |log()
the queries I'm able to identify the record that is dropped by the join - it was emitted by one query and not the other.
Any suggestions on how to further troubleshoot this?
TICK script:
var raw_event = batch
|query('''select rsum from jsx.autogen.raw_event''')
.period(1m)
.every(1m)
.offset(1h)
.align()
.groupBy('location')
var event_latency = batch
|query('''select rsum from jsx.autogen.event_latency''')
.period(1m)
.every(1m)
.offset(1h)
.align()
.groupBy('location', 'glocation')
raw_event
|join(event_latency)
.fill('null')
.as('raw_event','event_latency')
.on('location')
.streamName('join_stream')
|log()
Stats:
"node-stats": {
"batch0": {
"avg_exec_time_ns": 0,
"collected": 65,
"emitted": 0
},
"join4": {
"avg_exec_time_ns": 11523,
"collected": 65,
"emitted": 32
},
"log5": {
"avg_exec_time_ns": 0,
"collected": 32,
"emitted": 0
},
"query1": {
"avg_exec_time_ns": 0,
"batches_queried": 33,
"collected": 33,
"emitted": 33,
"points_queried": 33,
"query_errors": 0
},
"query2": {
"avg_exec_time_ns": 0,
"batches_queried": 32,
"collected": 32,
"emitted": 32,
"points_queried": 32,
"query_errors": 0
}