Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am new to Qlickview and have a requirement to perform Incremenal load ( insert & Update) at work. I have got idea on how Incremental load works by looking blwo scripts:
Script Example:
QV_Table:
SQL SELECT PrimaryKey, X, Y FROM DB_TABLE
WHERE ModificationTime >= #$(LastExecTime)#;
Concatenate LOAD PrimaryKey, X, Y FROM File.QVD
WHERE NOT Exists(PrimaryKey);
STORE QV_Table INTO File.QVD;
Below is kind of data I have, shown in excel screen shot ( see attached JPG) file. In that data, Request Id is Non Primary Key and it can be repeted due to Program Name. If I have this kind of data, how can I use Incremantal load ?? As it requires Primary Key in NOT Exit clause. Please Help.
Thank you.
can you use Request Id and Program Name as primary key?
if yes you can concatenate these 2 fields
QV_Table:
Load *,
[Request Id] & [Program Name] as NewPK;
SQL SELECT X, Y FROM DB_TABLE
WHERE ModificationTime >= #$(LastExecTime)#;
Concatenate LOAD NewPK, X, Y FROM File.QVD
WHERE NOT Exists(NewPK);
STORE QV_Table INTO File.QVD;
can you use Request Id and Program Name as primary key?
if yes you can concatenate these 2 fields
QV_Table:
Load *,
[Request Id] & [Program Name] as NewPK;
SQL SELECT X, Y FROM DB_TABLE
WHERE ModificationTime >= #$(LastExecTime)#;
Concatenate LOAD NewPK, X, Y FROM File.QVD
WHERE NOT Exists(NewPK);
STORE QV_Table INTO File.QVD;
Thank you Massimo Grossis. It worked. Not sure why I did not think about that .