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

Buffering issues

I have a couple of SQL SELECT statements that I need buffered to improve load time.  I place the BUFFER command prior to my SQL SELECT, reload, and all is well.  However, on any subsequent reload I do not get new data from my database.  It looks like I'm only pulling data that was buffered and I need new data from the db appended it to that set.  It's my understanding this is the purpose of the BUFFER statement.  The syntax I've used is pretty straigt forward - BUFFER SQL SELECT then a pretty complex select statement.  Also, we're on v8.5.

What am I doing wrong here?

Thanks in advance,

Mick

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

BUFFER command should be used in combination with option parameter "Stale after", where you can specify how long do oyu consider the buffer to be valid. According to the Help Article:

"If no option is used, the QVD buffer created by the first execution of the script will be used indefinitely."

Alternatively, I'd recommend implementing a full-blown Incremental Load logic, if you have a reliable timestamp of the data update. Look up an article "Using QVD files for Incremental Load" in the Help Section.

cheers,

Oleg

Not applicable
Author

The documentation states "The incremental option can only be used with text files."  There has to be an option available within QV for delta database loads rather than having to generate my own logic.  Right? 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

There is no native option in QV for SQL incremental loads. However, it's possible to write script that will do incremental loads. There are a few patterns available depending on your requirements. Incremental loads involve using QVDs. Start by reviewing the "Incremental Loads" chapter in the QVD section of the Ref Guide. But don't  use those code examples as is. Other places to get examples of Incremental Load script.

1. The QV Cookbook. (http://robwunderlich.com/downloads/)

2. Qlikview Components (http://qlikviewcomponents.org)

3. This forum.

-Rob