Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

incremental load and show all data

Hi I made and Incremental load from my acces DB and I stored all the data in a QVD file and it works.

ODBC CONNECT TO [test_qvd;DBQ=C:\Temp\TestQV\test_DB.mdb];
LET LastExecTime = ReloadTime();
LET BeginningThisExecTime = Now();


T1:
SQL SELECT * FROM Tabella1
WHERE Modifica >= #$(LastExecTime)#
AND Modifica < #$(BeginningThisExecTime)#;
Concatenate LOAD * FROM andrea.qvd;
STORE T1 INTO andrea.qvd;

The problem is that in my QV file I want to see all the records the previous and the new...how can I do.

Thank you in advance.

Andrea

6 Replies
Miguel_Angel_Baeyens

Hello Andrea,

You can do a partial reload (File, Partial Reload), so you keep all data already loaded in your model, and then add those new records. So you will use something like (untested)

ODBC CONNECT TO [test_qvd;DBQ=C:\Temp\TestQV\test_DB.mdb];LET LastExecTime = ReloadTime();LET BeginningThisExecTime = Now();T1:ADD LOAD *;SQL SELECT * FROM Tabella1WHERE Modifica >= #$(LastExecTime)#AND Modifica < #$(BeginningThisExecTime)#;Concatenate LOAD * FROM andrea.qvd;REPLACE STORE T1 INTO andrea.qvd;


You can control when to load something depending on whether they have to be loaded in a partial or full reload using

If (Not IsPartialReload()) Then ...


You may not want the table to load without limits, so in any point you will need to do a full reload and then start incremental (partial) reloads. Same with the QVD file.

Hope that helps!

Not applicable
Author

Hi Miguel thank you for your rapid reply however the script adds only the new record correctly but the QV file shows only this new record and if i click reload 2 times no records are displayed.

Aany other suggestion ?

Thank U

Andrea

Not applicable
Author

Hey Miguel,

one quick question.. does partial reload work on left join table.?

Miguel_Angel_Baeyens

Hello Andrea,

What I do to control which dates have to be loaded into QlikView is creating a QVD file daily or weekly, and then I do, in short

FactTable:LOAD *FROM *.QVD (qvd);


That loads all QVD files from the directory I'm working. As loading from QVD files is far faster than from database, I've got two different scripts, one that pulls from the database and the other that loads from QVD into QlikView. That may work for you as well.

Miguel_Angel_Baeyens

Hello,

In theory, something like

LOAD * INLINE [ID, AmtA, 1B, 2C, 3];REPLACE LEFT JOIN LOAD * INLINE [ID, Amt2A, 4D, 4C, 5];


should work (untested).

Hope that helps

Not applicable
Author

Thanks

Andrea