Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Suppose I have a employee data. First I generate the QVD's. When i start to perform incremental load on QVD's using API's so i want only change data add in the QVD based on employee ID.
How to solve this problem?
Do we have any date field which tell us that there is change in this record??
if yes then use that field to do increment + update load.
regards,
Prashant Sangle
Hi @Vikash2024 ,
Try as like below.
QV_Table:
SQL SELECT Emp_ID, X, Y FROM DB_TABLE
WHERE ModificationTime >= #$(LastExecTime)#
AND ModificationTime < #$(ThisExecTime)#;
Concatenate LOAD Emp_ID, X, Y FROM File.QVD
WHERE NOT EXISTS(Emp_ID);
Inner Join SQL SELECT Emp_ID FROM DB_TABLE;
No there is no date field based on ID i need to capture the change and update according to that.
Thank you for the solution. But in the table i don't have date and time column.
If you don't have date time field then it is difficult to build incremental logic.
Do you have any indicator field which suggest that this column is updated.
Regards,
Prashant Sangle
Hi @Vikash2024 , Try this
IF isnull(QvdCreateTime('Incremental_Table.qvd')) then
Incremental_Table:
LOAD * INLINE [Emp_ID, Emp_NAME];
LET vMaxID = 0;
ELSE
Incremental_Table:
LOAD
Emp_ID,
Emp_NAME
from
IncrementalTable.qvd (qvd);
MAXID:
LOAD Max(Emp_ID) as maxID RESIDENT Incremental_Table;
LET vMaxID = peek('maxID', -1,'MAXID');
END IF
CONCATENATE (Incremental_Table) LOAD
Emp_ID,
Emp_NAME
from
SOURCE
WHERE Emp_ID > $(vMaxID);
STORE Incremental_Table into Incremental_Table.qvd (qvd);
Thank you for sharing the solution
Id column which can be use.
Try with your Emp_ID.