Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jsnova0101
New Contributor II

problem qlik sense using rest server to incremental update qvd file

Hi,

I want to incremental update my qlik sense file. at the moment i am using a qvd file to store the data

the datasource can add, delete change data and i want my source to get the recent changes.

But as soon as I add where to my code I get a substring error.

[code]

LIB CONNECT TO 'MendixRestConnectie';

Set vQVDPath = lib://MendixRestFolder/;

LET vLastExecTime =  num(QvdCreateTime('$(vQVDPath)Test.QVD'));

Let vThisExecTime = num(date(Now(),'DD-MM-YYYY hh:mm:ss'));

//

//laat variable in exec zien

Trace $(vLastExecTime);

Trace $(vThisExecTime);

Sleep(100);

// timestamp(if(isnull(QvdCreateTime('$(vQVDPath)Test.QVD')), 0, ConvertToLocalTime(QvdCreateTime('$(vQVDPath)Test.QVD'), 'GMT', 1)), 'YYYY-MM-DD hh:mm:ss');

//haalt data op

[root]:

LOAD

  "IdId",

  "Salaris" as "Salaris",

  "Naam" as "Naam",

  "changedDate",

  "Changed" ,

  "Changed" as "ModificationTime",

  "ChangedAsLong";

SQL SELECT

  "IdId",

  "Salaris" as "Salaris",

  "Naam" as "Naam",

  "changedDate",

  "Changed",

  "Changed" as "ModificationTime",

  "ChangedAsLong"

FROM JSON (wrap on) "root"

WHERE "ChangedAsLong" >= $(vLastExecTime);

//  AND date(ModificationTime) < $(vThisExecTime);

//store root into $(vQVDPath)Test.QVD (QVD);

Concatenate

LOAD

  IdId,

  Salaris as Salaris,

  Naam as Naam,

  changedDate,

  Changed,

  Changed as ModificationTime,

  ChangedAsLong

FROM $(vQVDPath)Test.QVD (QVD)

WHERE NOT EXISTS(IdId);

If ScriptErrorCount = 0 then

  STORE root INTO $(vQVDPath)Test.QVD;

  Let vLastExecTime = num(vThisExecTime);

End If

[/code]

Unknown substring, string, or value at (10,19): '>= '

Het bericht is bewerkt door: Joey