Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nihhalmca
Specialist II
Specialist II

Add, Add Only and Replace, Replace Only

Hi All,

How it works Add and Adds Only when it click by reload.

‌How it works Add and Adds Only when it click by partial reload.

How it works Replace and Replace Only when it click by reload.

How it works replace and Replace Only when it click by partial reload.

Thanks,

NIhhal.

2 Replies
evan_kurowski
Specialist
Specialist

Hello Nihhal,

Those statements represent keywords that indicate when LOAD statements are to be exeucted in Full vs. Partial reload.

LOAD statements will attempt during Full reloads

{ADD|REPLACE} LOAD statements will attempt during both Full & Partial reloads


{ADD|REPLACE} {ONLY} LOAD will only attempt to fulfill during Partial reloads


There is one key piece missing from documentation however, that can be confusing.

Replace

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.

What is not mentioned here is that if you alter the field structure of the table targeted for replacement in any way, REPLACE will fail to correlate the original to the incoming and it will instead add a second table to the data model, that takes the original table name and appends the '-#' suffix to it..

(example results where during partial reload, attempt is made to REPLACE original single field table [FrenchFries], and replace it with a two-field table.  If you were attempting REPLACE on a massive fact table, and wanted to create, drop, or alias any of the columns, the results after partial reload would be two-parallel copies of the fact table in the data model resulting in a giant synthetic key that will bomb out the app.)

So in cases where you want to REPLACE a table with one that has a tweaked or altered field structure (which can be often), if you're going about that via partial reloads, you have to use a DROP | ADD combination.  REPLACE works when the table structure is solidified.

nihhalmca
Specialist II
Specialist II
Author

Hi Evan,

Thanks for response.

I tried Add and Replace by Partial reload however, it is loading/refreshing all table instead of table where i prefix add/replace. can you assist me on this.

Please find the attachment.


Nihhal.