Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi...What is the use of Resident load , Binary load and Incremental load and how to use those in script level , Can any one tell those with an example...
Hiii
see the attached file for binary load
http://www.qlikviewaddict.com/2012/02/power-of-binary.html
Incremental load
http://community.qlik.com/thread/53555
http://www.quickintelligence.co.uk/qlikview-incremental-load/
http://robwunderlich.com/downloads
Code For Incrmental load
Please refer this code for incremental Load.
/* Setup for incremental load. */
/*
The following items are used multiple times in the script.
It's easiest to specify them in variables.
*/
SET vQvdFile='EventsTable.qvd'; //?? The QVD filename
SET vTableName='myTable'; //?? The name of the QV table we are loading on the Data Load tab
SET vPK='EventId'; //?? Data Primary Key
// Set a variable indicating if the QVD exists or not. -1 is True, 0 is False
LET vQvdExists = if(FileSize('$(vQvdFile)') > 0, -1, 0);
IF $(vQvdExists) THEN // QVD exists, we will do an incremental reload
maxdateTab:
// Get the max date from this QVD for use in incremental SELECT
LOAD max(ModDate) as maxdate //?? Set the name of the date or datetime field
FROM $(vQvdFile) (qvd);
//?? Date may need to be formatted to match the format expected by your SQL SELECT or LOAD statement.
//?? e.g., date(peek('maxdate'),'MMDDYYYY');
LET vIncrementalExpression = 'WHERE ModDate >=' & peek('maxdate');
DROP table maxdateTab;
ELSE // QVD does not exist
LET vIncrementalExpression = ''; // No QVD. Force full reload
//LET vIncrementalExpression = 'WHERE ModDate >=' & MakeDate(2005,01,01); //?? Could also set it to some floor date
END IF
/*
Load the incremental changes or full reload.
This is a standard LOAD (or SQL SELECT) statement.
vIncrementalExpression is the WHERE clause create in the previous tab,
*/
-------------------------------------------------------------------------------------------------------------------
/* Data Load */
Directory;
$(vTableName):
LOAD
EventId, // Primary Key
ModDate, // Row modification date
EventDate,
Description,
Status
FROM EventsTable.csv (ansi, txt, delimiter is ',', embedded labels, msq)
// If doing a SQL SELECT, the vIncrementalExpression would be part of the SQL SELECT statement.
$(vIncrementalExpression) // Include WHERE clause created in "Incremental Setup" tab
;
----------------------------------------------------------------------------------------------------------
/* Incremental Update*/
/*
Update the QVD with changes.
*/
Directory;
// If incremental reload was , load previous data and concatenate to data just read.
IF $(vQvdExists) THEN
// Use CONCATENATE in case we've added any new fields.
CONCATENATE ($(vTableName)) LOAD * FROM $(vQvdFile) (qvd)
WHERE NOT exists($(vPK)) // Load only QVD rows that were not already loaded in the data load.
;
END IF
/*
Handle deleted rows. The entire set of Primary Keys from the source table
is INNER JOINed with the Primary Keys in the QV data table.
Any Key that does not exist in the source table will be deleted from the QV Table.
For a large source table, it may take a while to fetch all the Key values.
If you do not need to handle deleted rows, don't include this step,
*/
INNER JOIN ($(vTableName))
LOAD $(vPK)
FROM EventsTable.csv (ansi, txt, delimiter is ',', embedded labels, msq)
;
/*
Overwrite the QVD with the QV datatable.
*/
STORE $(vTableName) INTO $(vQvdFile);
//DROP TABLE $(datatable); // If we don't need the table in this qvw, it's a good practice to drop large tables.
Resident Load---->>
See the link
http://community.qlik.com/thread/57924
hope it helps