Hi,
I'm quite fresh in splunk and need your help. Trying to combine spl with sql.
tag 25 is event id same as sql ele.batch_event_id
I suspect ele.batch_event_id = $25$ is wrong.
Any idea please 🙂
Error is :
Search:
index=star_linux sourcetype=engine_processed_events 2961= BBHCC-S2PBATCHPOS-BO OR BBHCC-S2PBATCHPOS-B2 OR BBHCC-S2PBATCHPOS-PO OR BBHCC-SOD-IF-Weekday-1 AND 55:GEN_STAR_PACE
|table 4896,25,55,2961
| map search="| dbxquery query= \"SELECT MIN (ele.process_time) as MIN_PROCESS_time ,MAX (ele.process_time) as MAX_PROCESS_time
FROM
estar.estar_loopback_events ele,
estar.engine_configuration ec
WHERE ele.engine_instance = ec.engine_instance
AND ele.batch_event_id = $25$
AND process_time BETWEEN TO_DATE('20230215:00:00','YYYYMMDD hh24:mi:ss')
and TO_DATE('20230216 12:59:59','YYYYMMDD hh24:mi:ss') \" connection='stardb' "
|table 4896, 25,MIN_PROCESS_time, MAX_PROCESS_time
ele.engine_instance is alfanumeric field like 6JPK6699UV05FV51 eg.
The construct $<something>$ is valid only with the map command or in a dashboard. In every case, however, <something> must be a token name or field name rather than a number.
If ele.batch_event_id is a number then use ele.batch_event_id=25; otherwise, use ele.batch_event_id = "25"
ele.engine_instance is alfanumeric field like 6JPK6699UV05FV51 eg.