Please help me in the below query. I read the qlik documents but still confused.
I have connected ODBC with Qlik Sense. In SQL the data is updated every day. As there are millions of data approx 200 million data, I need to load the new data only so that it takes less time to upload the data in qvd.
I have created a variable using LET statement which contains maximum date. I am using the variable in the where statement to get the new data.
The issue is when I load the data first time it loads the new data. But when I load it again it shows that data is loaded again which is not correct. The output must be 0 ideally
As per me the mistake is creating the variable and passing the variable. I have created a variable which picks the maximum post date from the table
I have passed this variable in the script in where clause as
(ooxml, embedded labels, table is Sheet1)
where "Date" > $(varMAXDATE);
DATE(MAX("Date")) as MAXDATE
LET varMAXDATE = PEEK('MAXDATE',0,'Incta');
I don’t have the qvd as well as script the qvd is in other environment.
Can someone please guide the best method for incremental load in qvd and correct me also.
and check that the variable is set correctly to a number after reload.
[I believe your formatted date won't be recognized as date after dollar sign expansion, so you could also try to embed the variable in single quotes: where "Date" > '$(varMAXDATE)'; but I would try the first suggested approach using Num() first]