Hi, I'm trying to do an incremental load from PostgreSQL. Currently I have this code
let ThisExecTime = Date(Today(), 'YYYY-MM-DD');
[measurement]:
LOAD Date(meas_date) as %DateKey, Time(meas_time) as Måletidspunkt, meas_time, tag_id, meas_value;
Select date("meas_time") as meas_date, "meas_time", "tag_id", "meas_value" from measurement where tag_id in(348, 341, 694, 695, 698, 699, 349, 1020) and meas_time >= '2021-02-07' //'$(PreviousExecTime )' Using static date for test purpose AND meas_time < '$(ThisExecTime)';
concatenate LOAD %DateKey, Måletidspunkt, meas_time, tag_id, meas_value FROM 'lib://01. Data repository Prod/2_Transform/Biologisk/Measurement.qvd'; //WHERE NOT Exists(tag_id, meas_time);
STORE measurement INTO 'lib://01. Data repository Prod/2_Transform/Biologisk/Measurement.qvd';
let PreviousExecTime = ThisExecTime;
On "concatenate LOAD %DateKey..." i get the error: "Field '%DateKey' not found". However, both in my preceding load statement and in the QVD file (picture of QVD file attached) I have %DateKey.
Additionally when "WHERE NOT Exists(tag_id, meas_time)" is uncommented I get the error:
"Unexpected token: 'tag_id', expected one of: 'txt', 'Table', 'tab', 'biff', 'dif', 'fix', 'html', ...: concatenate LOAD %DateKey, Måletidspunkt, meas_time, tag_id, meas_value FROM 'lib://01. Data repository Prod/2_Transform/Biologisk/Measurement.qvd' WHERE NOT Exists(>>>>>>tag_id<<<<<<, meas_time)"