Skip to main content

Replace

The Replace prefix can be added to any LOAD or SELECT statement in the script to specify that the loaded table should replace another table. It also specifies that this statement should be run in a partial reload. The Replace prefix can also be used in a Map statement.

Note: Partial reload is supported by using the Qlik Engine JSON API, or the Reload button. For more information about the Reload button, see Button.

Syntax:  

Replace [only] [Concatenate[(tablename)]] (loadstatement | selectstatement)


Replace [only] mapstatement

 

During a normal (non-partial) reload, the Replace LOAD construction will work as a normal LOAD statement but be preceded by a Drop Table. First the old table will be dropped, then records will be generated and stored as a new table.

If the Concatenate prefix is used, or if there exists a table with the same set of fields, this will be the relevant table to drop. Otherwise, there is no table to drop and the Replace LOAD construction will be identical to a normal LOAD.

A partial reload will do the same. The only difference is that there is always a table from the previous script execution to drop. The Replace LOAD construction will always first drop the old table, then create a new one.

The Replace Map...Using statement causes mapping to take place also during partial script execution.

Arguments:  

Arguments
Argument Description
only An optional qualifier denoting that the statement should be executed only during partial reloads. It should be disregarded during normal (non-partial) reloads.