Hi,
I am observing below error(in bold) in extractor log for timeseries query:
2023-01-24 03:31:03.345 UTC CINFO ] QueryExecutor_0 - Starting extraction of avocet-timeseries
2023-01-24 03:31:03.345 UTC UDEBUG ] QueryExecutor_0 - Query: 'SELECT ITEM_ID + PROPERTY_TYPE+'Avocet' as "externalId", START_DATETIME as timestamp, PROPERTY_VALUE as value FROM ITEM_PROPERTY1 WHERE START_DATETIME is not null and PROPERTY_VALUE is not null and LAST_UPDT_DATE is not null ORDER BY LAST_UPDT_DATE ASC'
2023-01-24 03:31:03.612 UTC INFO ] QueryExecutor_0 - No more rows for avocet-timeseries. 2 rows extracted in 0.267 seconds
2023-01-24 03:31:03.873 UTC 7DEBUG ] ThreadPoolExecutor-9_0 - https://westeurope-1.cognitedata.com:443 "POST /api/v1/projects/slb-pdf/timeseries/data HTTP/1.1" 200 22
2023-01-24 03:31:03.875 UTC 8DEBUG ] ThreadPoolExecutor-9_0 - HTTP/1.1 POST https://westeurope-1.cognitedata.com/api/v1/projects/slb-pdf/timeseries/data 200
2023-01-24 03:31:03.877 UTC .INFO ] QueryExecutor_0 - Uploaded 2 datapoints
2023-01-24 03:31:03.878 UTC 0ERROR ] QueryExecutor_0 - Can't store state for avocet-timeseries, LAST_UPDT_DATE is NULL/not present
2023-01-24 03:31:03.880 UTC :ERROR ] QueryExecutor_0 - Error in extraction of avocet-timeseries: 'Missing incremental_field'
2023-01-24 03:31:03.881 UTC 1INFO ] QueryExecutor_0 - Closing ODBC connection to sqldb for avocet-timeseries
The query section in the configuration is as below:
name: avocet-timeseries
query:
SELECT
ITEM_ID + PROPERTY_TYPE as "externalId",
START_DATETIME as timestamp,
PROPERTY_VALUE as value
FROM
ITEM_PROPERTY1
WHERE
START_DATETIME is not null and PROPERTY_VALUE is not null and LAST_UPDT_DATE is not null and LAST_UPDT_DATE >= CAST('{start_at}' AS DATETIME2)
ORDER BY
LAST_UPDT_DATE ASC
incremental-field: LAST_UPDT_DATE
schedule: "*/1 * * * *"
initial-start: '2020-01-01'
destination-type: TIME_SERIES
If we use the raw queries, the state is being maintained properly but for timeseries query I am facing this issue.
Can you please take a look and provide the recommendations?