Query Kpi_Data using pdm_extract with kpi_time_stamp
search cancel

Query Kpi_Data using pdm_extract with kpi_time_stamp

book

Article ID: 273524

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager

Issue/Introduction

Trying to extract the kpi data for a year using pdm_extract but this command gives me an Error in fetch 

pdm_extract -f "select kpi_id, kpi_time_stamp, kpi_value from Kpi_Data where kpi_id = 8838 and kpi_time_stamp >= DATE'2022-09-13'"

 

Environment

Release : 17.3

Resolution

The right command should be

pdm_extract -f "select kpi_id, kpi_time_stamp, kpi_value from Kpi_Data where kpi_id = 8838 and kpi_time_stamp >= 1663041600"

The kpi_time_stamp is an Unix time stamp and need to convert it into an integer - https://www.unixtimestamp.com/