Unable to get single row from an InfluxDB table with TickScript

Hi,

Trying to return a single row/column called globalFlg with a boolean value from an InfluxDB table alert_output_flg.
But this tickscript below returns nothing.
Tried without eval but nothing is getting dumped to httpOut at http://localhost:9092/kapacitor/v1/tasks/threshold_alert/globalFlg1
It shows {series: null} as the response.

var globalFlg1 =
stream
|from()
.measurement(‘alert_output_flg’)
.where(lambda: “__agg_group_by” == ‘deployment_id__game_id__subsystem_name__component_name’)
|eval(lambda: “globalFlg” == ‘true’ OR “globalFlg” == ‘false’)
.as(‘globalFlg’)
.keep()
|httpOut(‘globalFlg1’)

I have other code working fine in the same script. Below shows the badStateData at the REST endpoint http://localhost:9092/kapacitor/v1/tasks/threshold_alert/badStateData

var windowedData =
stream
|from()
.measurement(‘stream_perio’)
.where(lambda: “__agg_period” == ‘5s’)
|window()
.period(1m)
.every(1m)
.align()
var badStateData = windowedData
|eval(lambda: “output_fps__count” < 29)
.as(‘badState’)
.keep()
|httpOut(‘badStateData’)

TIA

This script below at least shows a response with emitted=0 below.
Script:
var globalFlg1 =
stream
|from()
.measurement(‘alert_output_flg’)
.where(lambda: “__agg_group_by” == ‘deployment_id__game_id__subsystem_name__component_name’)
|stats(10s)
.align()
|httpOut(‘globalFlg2’)

Response:
{
name: “stats”,
columns: [
“time”,
“emitted”
],
values: [
[
“2019-08-16T19:06:10Z”,
0
]
]
}
Seems like a simple thing to do- get a single row from a DB table ?
Any help is appreciated.