Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

sunilkumarqv
Valued Contributor II

Increamental Load

These scernoirs what you send is very basic would you post somthing like sql database  having multiple tables some tables are concatenated and other are remain  I dont have timestamp rather that have Date.My Question is How To do update and insert for these scenarios?

Let consider these scenorios

//For Concatenated tables

TabA;

Load * From Datasource;

concatenate

TabB;

Load *From Datasource;

concatenate

TabC;

Load From Datasource;

//Normal table

TabD

Load * Datasource;

7 Replies
Not applicable

Re: Increamental Load

Please post Primary Key and Timestamp or date fields (which shows the field updated or inserted) details

Not applicable

Re: Increamental Load

Hi Sunil,

I dont understand why you concatenate 3 times the same table as TabA. Why you are doing this? As Dathu says can you post the rules you can use to identify the rows to add or update? What is the key of this table?

Regards.

simsondevadoss
Contributor III

Re: Increamental Load

Hi sunil,

you need a primary key to perform incremental load.

Please find the attached document. It might be helpful to you.

Regards,

Simson

neetha_p
Honored Contributor

Re: Increamental Load

Hi Sunil,

You can use date column in source table  to update or insert records.

Try to use Exist() - to  update when records exist in QVD or Resident Load and source table date is greater than date in QVD for particular record.

Next use Not Exist() to insert records which do not exist in QVD or Resident Load.

You can use primary key,if you don't have date field to insert records which do not exist in already loaded data.

sunilkumarqv
Valued Contributor II

Re: Increamental Load

Can you post sample script ?

neetha_p
Honored Contributor

Re: Increamental Load

Hi Sunil.

Please check below script:

MASTER:LOAD pid,
    
pname,
    
priceFROM

(
qvd);

TEMP:LOAD MAX(pid) AS MAXPID
    
Resident MASTER;
DROP Table MASTER;  
LET Vmax = Peek('MAXPID',-1,'TEMP');

Sales:LOAD pid,
    
pname,
    
priceFROM

(
ooxml, embedded labels, table is TRANSACTION) Where pid >$(Vmax);
JoinLOAD pid,
    
pname,
    
priceFROM

(
qvd) Where NOT Exists(pid);

rajeshvaswani77
Valued Contributor III

Re: Increamental Load

Hi Sunil,

See the attachment for Incremental load scenarios in detail with examples.

thanks,

Rajesh Vaswani