Hi, how can I combine two fields (2.1 and 2.2) into one field (Main calculation)
I have a table :
I would like to convert it into something like this : where START_TIME is the value o...
See more...
Hi, how can I combine two fields (2.1 and 2.2) into one field (Main calculation)
I have a table :
I would like to convert it into something like this : where START_TIME is the value of 2.1 and the FINISH_TIME is the value of 2.2 field. Completion_time is sum of both two fields (0.35 + 60.53)
SPL query:
| eval finish_time_epoch = strftime(strptime(FINISH_TIME, "%Y-%m-%d %H:%M:%S"),"%Y-%m-%d %H:%M:%S") | eval start_time_epoch = strftime(strptime(START_TIME, "%Y-%m-%d %H:%M:%S"),"%Y-%m-%d %H:%M:%S") | eval duration_s = strptime(FINISH_TIME, "%Y-%m-%d %H:%M:%S") - strptime(START_TIME, "%Y-%m-%d %H:%M:%S") | eval duration_min = round(duration_s / 60, 2) | rename duration_min AS Completion_time
| eval Process=if(Process="013","2.1 Main calculation",Process)
| eval Process=if(Process="014","2.2 Main calculation",Process)
| table Process, 2.START_TIME, 3.FINISH_TIME , 4.Completion_time
| sort -START_TIME, -FINISH_TIME | sort +Process | transpose 0 header_field=Process column_name=Process | dedup Process