Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
marksmunich
Contributor II

Replace load

What is replace load, when do we use it ?

Tags (2)
2 Replies
MVP
MVP

Re: Replace load

from online help

"

The replace prefix can be added to any Load, Select (SQL) or Map ... using statement in the script. The replace load/replace select statement has the effect of dropping the entire QlikView table, for which a table name is generated by the replace load/replace select statement, and replacing it with a new table containing the result of the replace load/replace select statement. The effect is the same during Partial Reload and full reload. The replace map...using statement causes mapping to take place also during partial script execution.

The syntax is:

replace[only](loadstatement |selectstatement |map...usingstatement)

where:

only is an optional qualifier denoting that the statement should be disregarded during normal (non-partial) reloads.

Examples:

Tab1:

Replace load * from File1.csv;

During both normal and partial reload, the QlikView table Tab1 is initially dropped. Thereafter new data is loaded from File1.csv and stored in Tab1.

Tab1:

Replace only load * from File1.csv;

During normal reload, this statement is disregarded.

During partial reload, any QlikView table previously named Tab1 is initially dropped. Thereafter new data is loaded from File1.csv and stored in Tab1.

Tab1:

Load a,b,c from File1.csv;

Replace load a,b,c from File2.csv;

During normal reload, the file File1.csv is first read into the QlikView table Tab1, but then immediately dropped and replaced by new data loaded from File2.csv. All data from File1.csv is lost.

During partial reload, the entire QlikView table Tab1 is initially dropped. Thereafter it is replaced by new data loaded from File2.csv.

Tab1:

Load a,b,c from File1.csv;

Replace only load a,b,c from File2.csv;

During normal reload, data is loaded from File1.csv and stored in the QlikView table Tab1. File2.csv is disregarded.

During partial reload, the entire QlikView table Tab1 is initially dropped. Thereafter it is replaced by new data loaded from File2.csv. All data from File1.csv is lost.

"

Not applicable

Re: Replace load

Generally we can use REPLACE Load in Partial Reloads. Please check the Help file some more info.

Community Browser